Forrest logo
tool overview
On this page you find all important commands for the CLI tool update-alternatives. If the command you are looking for is missing please ask our AI.

update-alternatives

"update-alternatives" is a command line tool used in Unix-like operating systems to manage symbolic links to different versions of a program. It allows users to choose between different versions of a program, such as an interpreter or compiler, that can coexist on the same system. The tool provides a way to switch default programs globally or on a per-user basis. It is commonly used to handle different versions of programming languages, such as Java, Python, or GCC. "update-alternatives" maintains a set of symbolic links pointing to the different versions and automatically adjusts the links when a new version is installed. It also allows users to manually configure the alternatives by adding, removing, or modifying the available options. The tool simplifies the process of managing multiple versions of programs, making it easier to test and switch between different versions based on user requirements.

List of commands for update-alternatives:

  • update-alternatives:tldr:00eff update-alternatives: Display all commands and their current selection.
    $ update-alternatives --get-selections
    try on your machine
    explain this command
  • update-alternatives:tldr:06ca3 update-alternatives: Add a symbolic link.
    $ sudo update-alternatives --install ${path-to-symlink} ${command_name} ${path-to-command_binary} ${priority}
    try on your machine
    explain this command
  • update-alternatives:tldr:15f62 update-alternatives: Remove a symbolic link.
    $ sudo update-alternatives --remove ${java} ${-opt-java-jdk1-8-0_102-bin-java}
    try on your machine
    explain this command
  • update-alternatives:tldr:244e6 update-alternatives: Display information about a specified command.
    $ update-alternatives --display ${java}
    try on your machine
    explain this command
  • update-alternatives:tldr:a128b update-alternatives: Configure a symbolic link for `java`.
    $ sudo update-alternatives --config ${java}
    try on your machine
    explain this command
tool overview