- - - - - yumeneru - - - - - nemuru - - - - -

Update Alternatives

Some examples of using the update-alternatives command.

Retrieve List of Alternatives

To list all the possible alternatives:

update-alternatives --get-selections

You can find the x-* alternatives when piping to grep.

update-alternatives --get-selections | grep -e '^x-'

List Potential Alternatives

To find all the potential alternatives for something:

update-alternatives --display $alternative

For example, you could replace $alternative with x-www-browser to list all alternatives for the default browser.

Add an Alternative

Say the browser you want to use isn't listed as an alternative, you can add it along with the default priority:

update-alternatives --install /usr/bin/x-www-browser \
		  x-www-browser /path/to/new-browser $priority

If the priority is higher than the current alternative, than the new program will be used unless you have previously chosed something manually.

last updated: 2021-08-30