Last active
July 5, 2019 09:42
-
-
Save FrannyZhao/e9b6e2c927fbc4c29ce40cc342597330 to your computer and use it in GitHub Desktop.
ubuntu set alternative
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
添加2个make版本: | |
$ sudo update-alternatives --install /usr/bin/make make /usr/bin/make3.81 1010 | |
update-alternatives: using /usr/bin/make3.81 to provide /usr/bin/make (make) in auto mode | |
$ sudo update-alternatives --install /usr/bin/make make /usr/bin/make4.1 1011 | |
update-alternatives: using /usr/bin/make4.1 to provide /usr/bin/make (make) in auto mode | |
查看一下是否添加成功: | |
$ sudo update-alternatives --display make | |
make - auto mode | |
link best version is /usr/bin/make4.1 | |
link currently points to /usr/bin/make4.1 | |
link make is /usr/bin/make | |
/usr/bin/make3.81 - priority 1010 | |
/usr/bin/make4.1 - priority 1011 | |
切换make版本: | |
$ sudo update-alternatives --config make | |
There are 2 choices for the alternative make (providing /usr/bin/make). | |
Selection Path Priority Status | |
------------------------------------------------------------ | |
* 0 /usr/bin/make4.1 1011 auto mode | |
1 /usr/bin/make3.81 1010 manual mode | |
2 /usr/bin/make4.1 1011 manual mode | |
Press <enter> to keep the current choice[*], or type selection number: 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment