How to Set Default Audio in Ubuntu
Using the pactl
command, setting default audio in Ubuntu is straightforward. For startup persistence, Ubuntu Startup Applications comes in handy.
pactl
is the cli entry for the PulseAudio sound server and will be used in this tutorial.
List all input and output audio
List audio outputs:
1pactl list short sinks
11 alsa_output.pci-0000_06_00.6.HiFi__hw_Generic__sink module-alsa-card.c s16le 2ch 48000Hz RUNNING
List audio inputs:
1pactl list short sources
11 alsa_input.usb-Blue_Microphones_Yeti_Stereo_Microphone_797_2019_02_24_60522-00.analog-stereo module-alsa-card.c s16le 2ch 44100Hz SUSPENDED
22 alsa_input.pci-0000_06_00.6.HiFi__hw_Generic__source module-alsa-card.c s16le 2ch 44100Hz SUSPENDED
33 alsa_input.pci-0000_06_00.6.HiFi__hw_acp__source module-alsa-card.c s32le 2ch 48000Hz SUSPENDED
Take note of the devices listed in the output.
Set default input and output audio
Command to set default audio output:
1pactl set-default-sink <device>
Example usage:
1pactl set-default-sink alsa_output.pci-0000_06_00.6.HiFi__hw_Generic__sink
Command to set default audio input:
1pactl set-default-source <device>
Example usage:
1pactl set-default-source alsa_input.usb-Blue_Microphones_Yeti_Stereo_Microphone_797_2019_02_24_60522-00.analog-stereo
Persist command on start/restart
Persisting audio output:
- Open the application named “Startup Applications” (should be preinstalled)
- Click “Add” button in the upper right hand corner
- Enter a command name such as: “Set default audio output” in the
Name:
field - Place the
pactl set-default-sink <device>
command in theCommand:
field - Click “Add” button in the bottom right hand corner of the prompt
Persisting audio input:
- Click “Add” button in the upper right hand corner
- Enter a command name such as: “Set default audio input” in the
Name:
field - Place the
pactl set-default-source <device>
command in theCommand:
field - Click “Add” button in the bottom right hand corner of the prompt