1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-28 20:44:54 +02:00
tldr/pages/linux/update-alternatives.md
Lucas Gabriel Schneider a5fe31bc47
multiple pages: format technical tokens (#5119)
Co-authored-by: bl-ue <54780737+bl-ue@users.noreply.github.com>
Co-authored-by: Starbeamrainbowlabs <sbrl@starbeamrainbowlabs.com>
2021-01-31 12:05:18 -05:00

625 B

update-alternatives

A convenient tool for maintaining symbolic links to determine default commands.

  • Add a symbolic link:

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

  • Configure a symbolic link for java:

sudo update-alternatives --config {{java}}

  • Remove a symbolic link:

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

  • Display information about a specified command:

update-alternatives --display {{java}}

  • Display all commands and their current selection:

update-alternatives --get-selections