优先级在 中是什么意思update-alternatives
?
优先级值越小代表什么?
优先级与默认值“*”有何关系和区别?
谢谢。例如:
$ sudo update-alternatives --config java
There are 4 choices for the alternative java (providing /usr/bin/java).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/lib/jvm/java-6-openjdk-i386/jre/bin/java 1061 auto mode
1 /usr/bin/gij-4.6 1046 manual mode
2 /usr/lib/jvm/java-6-openjdk-i386/jre/bin/java 1061 manual mode
* 3 /usr/lib/jvm/java-7-openjdk-i386/jre/bin/java 1051 manual mode
4 /usr/lib/jvm/jdk1.7.0_67/bin/java 1 manual mode
答案1
Each alternative has a priority associated with it. When a link group is in automatic
mode, the alternatives pointed to by members of the group will be those which have the
highest priority.
它可以是任何整数,甚至是负数(请参阅手册页中的示例)。
如果手动设置了替代方案,则优先级与默认值无关。