Alternatives: Difference between revisions
Jump to navigation
Jump to search
Line 25: | Line 25: | ||
alternatives --set java /usr/lib/jvm/java-1.8.0-amazon-corretto/jre/bin/java | alternatives --set java /usr/lib/jvm/java-1.8.0-amazon-corretto/jre/bin/java | ||
</syntaxhighlight> | </syntaxhighlight> | ||
The exact path can be obtained with [[#Obtain_the_Alternatives_for_an_Executables|--display]]. | The exact path can be obtained with [[#Obtain_the_Alternatives_for_an_Executables|--display]]. The command is sensitive to the exact absolute path of the "alternative" executable. |
Revision as of 06:24, 22 January 2021
Internal
Overview
alternatives
Obtain the Alternatives for an Executables
alternatives --display java
alternatives --display java | grep priority
The output contains the "alternatives" - which include the full path of the executable and a priority.
Set an Alternative Interactively
alternatives --config java
Set an Alternative Non-Interactively
alternatives --set java /usr/lib/jvm/java-1.8.0-amazon-corretto/jre/bin/java
The exact path can be obtained with --display. The command is sensitive to the exact absolute path of the "alternative" executable.