commands.sh

update-alternatives

linux

Convenientily maintain symbolic links to determine default commands.

More info →

Examples (5)

Add a symbolic link

sudo update-alternatives --install path/to/symlink command_name path/to/command_binary priority

Configure a symbolic link for `java`

Remove a symbolic link

sudo update-alternatives --remove java /opt/java/jdk1.8.0_102/bin/java

Display information about a specified command

Display all commands and their current selection

update-alternatives --get-selections
made by @shridhargupta | data from tldr-pages