Personal blog Address: http://www.cnblogs.com/wdfwolf3/
Update-alternatives is a command that Ubuntu systems use for software version switching. For example, there are several versions of the JDK in the system that map the directories of these commands to a system directory as a link, then manage them through update-alternatives and set the default startup version. With update-alternatives--help You can see the detailed usage of the command,
1.display Options
View all links to a command, detailed information display, including the mode (manual or automatic), the link's priority value,
2.install Options (--install < links > < name > < path > < priority > [--slave < link > < name > < path;])
Add a new set of command links,< link > is the public link directory for this command in the system,< name > Command link name,< path > is the directory where the newly added command is located,< priority > is a numeric value, When the mode is automatic, the system selects a large startup value.
As an example: Update-alternatives--install/usr/bin/java Java/usr/lib/java/jdk-1.8.0_92/bin/java 300. The installed JDK8 is mapped from its installation location to the system's/usr/bin/java link so that when the Java command is executed, the system chooses an execution from all linked versions.
3.config Options
List all the link options for this command, and you can choose a default startup link as prompted.
4.remove Options (--remove < name > < path >)
The path is the directory where the command wants to delete the link, not the system public directory, if you want to remove this command link is the--remove-all option, naturally this option does not need to add path, because all the paths are deleted.
5.auto Options
This is simple, which is to set a command to Auto mode.
Linux System update-alternatives Command use