Forrest logo
back to the update-alternatives tool

update-alternatives:tldr:244e6

update-alternatives: Display information about a specified command.
$ update-alternatives --display ${java}
try on your machine

The command "update-alternatives --display ${java}" is used to display information about the alternative versions of a specific tool or command in a Unix-like operating system.

Here's how the command is broken down:

  1. "update-alternatives" is the main command that is used to manage alternative versions of tools or commands on the system.

  2. "--display" is an option or flag that instructs the "update-alternatives" command to display the alternative version information rather than actually modifying any alternatives.

  3. "${java}" is a placeholder variable that represents the name of the tool or command for which alternative versions are being managed. In this case, it is "java", which likely refers to the Java Development Kit (JDK) or Java Runtime Environment (JRE).

By running this command, you can view information such as the available alternative versions of Java installed on your system, along with their respective priority levels and paths.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the update-alternatives tool