- - - - - yumeneru - - - - - nemuru - - - - -
Some examples of using the update-alternatives command.
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-'
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.
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