alternatives 使用 修改软链接 权值

1. alternatives

Linux代码 
alternatives version 1.3.13.5.EL4 - Copyright (C) 2001 Red Hat, Inc. 
This may be freely redistributed under the terms of the GNU Public License. 
 
usage: alternatives --install <link> <name> <path> <priority> 
                    [--initscript <service>] 
                    [--slave <link> <name> <path>]* 
       alternatives --remove <name> <path> 
       alternatives --auto <name> 
       alternatives --config <name> 
       alternatives --display <name> 
       alternatives --set <name> <path> 
 
common options: --verbose --test --help --usage --version 
                --altdir <directory> --admindir <directory> 


2. update-alternatives

Linux代码 
alternatives version 1.3.13.5.EL4 - Copyright (C) 2001 Red Hat, Inc. 
This may be freely redistributed under the terms of the GNU Public License. 
 
usage: alternatives --install <link> <name> <path> <priority> 
                    [--initscript <service>] 
                    [--slave <link> <name> <path>]* 
       alternatives --remove <name> <path> 
       alternatives --auto <name> 
       alternatives --config <name> 
       alternatives --display <name> 
       alternatives --set <name> <path> 
 
common options: --verbose --test --help --usage --version 
                --altdir <directory> --admindir <directory> 

3、实例

举个使用例子吧,改变系统bin默认java的指向:

Linux代码 
安装 
#alternatives --install /usr/bin/java java /home/server/jdk1.6.0_21/bin/java 300 
 
查询 
#alternatives --display java 
 
删除 
#alternatives --remove java  /home/server/jdk1.6.0_21/bin/java 
1. alternatives

Linux代码 
alternatives version 1.3.13.5.EL4 - Copyright (C) 2001 Red Hat, Inc. 
This may be freely redistributed under the terms of the GNU Public License. 
 
usage: alternatives --install <link> <name> <path> <priority> 
                    [--initscript <service>] 
                    [--slave <link> <name> <path>]* 
       alternatives --remove <name> <path> 
       alternatives --auto <name> 
       alternatives --config <name> 
       alternatives --display <name> 
       alternatives --set <name> <path> 
 
common options: --verbose --test --help --usage --version 
                --altdir <directory> --admindir <directory> 


2. update-alternatives

Linux代码 
alternatives version 1.3.13.5.EL4 - Copyright (C) 2001 Red Hat, Inc. 
This may be freely redistributed under the terms of the GNU Public License. 
 
usage: alternatives --install <link> <name> <path> <priority> 
                    [--initscript <service>] 
                    [--slave <link> <name> <path>]* 
       alternatives --remove <name> <path> 
       alternatives --auto <name> 
       alternatives --config <name> 
       alternatives --display <name> 
       alternatives --set <name> <path> 
 
common options: --verbose --test --help --usage --version 
                --altdir <directory> --admindir <directory> 

3、实例

举个使用例子吧,改变系统bin默认java的指向:

Linux代码 
安装 
#alternatives --install /usr/bin/java java /home/server/jdk1.6.0_21/bin/java 300 
 
查询 
#alternatives --display java 
 
删除 
#alternatives --remove java  /home/server/jdk1.6.0_21/bin/java 

你可能感兴趣的:(native)