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:
|
|
|
|
List audio inputs:
|
|
|
|
Take note of the devices listed in the output.
Set default input and output audio
Command to set default audio output:
|
|
Example usage:
|
|
Command to set default audio input:
|
|
Example usage:
|
|
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