Alternatives: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=Internal= * Linux =Overview= <syntaxhighlight lang='bash'> alternatives </syntaxhighlight>")
 
Line 7: Line 7:
alternatives
alternatives
</syntaxhighlight>
</syntaxhighlight>
=Obtain the Alternatives for an Executables=
<syntaxhighlight lang='bash'>
alternatives --display java
alternatives --display java | grep priority
</syntaxhighlight>
=Set an Alternative Interactively=
<syntaxhighlight lang='bash'>
alternatives --config java
</syntaxhighlight>
=Set an Alternative Non-Interactively=
<syntaxhighlight lang='bash'>
alternatives --set java /usr/lib/jvm/java-1.8.0-amazon-corretto/jre/bin/java
</syntaxhighlight>
The exact path can be obtained with --display.

Revision as of 05:13, 22 January 2021

Internal

Overview

alternatives

Obtain the Alternatives for an Executables

alternatives --display java
alternatives --display java | grep 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.