标签:bash 16px 使用 color 内容 -- gedit ash ati
方法摘自SegmentFault:
方法一:
echo alias python=python3 >> ~/.bashrc && source ~/.bashrc
相当于先打开gedit ~/.bashrc 修改alias python=python3这行内容
方法二(使用update-alternatives来修改priority):
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 100
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 150
如果要切换到python2
sudo update-alternatives --config python
按照提示输入选择数字回车即可。
这样你甚至可以将自己喜欢的任意版本python安装到任意位置,然后使用update-alternatives
将其设置为系统默认python。
标签:bash 16px 使用 color 内容 -- gedit ash ati
原文地址:http://www.cnblogs.com/xia-Autumn/p/6683076.html