Sound

Updated: September 28, 2024

Set default sound and mic on linux.

Linux Ubuntu does not set defaults I/O for sound

This can be adjusted in terminal First need to identify the devices we want to set as default by their corresponding number.

pactl list short sinks    # shows speaker devices

pactl list short sources    # shows microphone devices

To set these temporarily you could run the command:

set-default-sink 'device name'    # I suspect the number would work however
set-defualt-source 'device name'

To make it permanent we have to edit a file in editable text configuration and save it.

sudo vim /etc/pulse/defualt.pa

Get to the bottom of the file with G (note capital) as the 2 lines you are looking for should be at the bottom of the file.

uncomment (removing the # at start of line) and edit 2 lines using the numbers that correspond to the devices you want.

set-default-sink 0
set-default-source 4

*if in vim ZZ will save & quit or you can :wq! !IMPORTANT -> before restart delete current configuration

sudo rm -r ~/.config/pulse

Reboot

sudo shutdown -r now