python和python3命令通常是指向实际可执行文件的软链接,可以更改目标。例如:
首先,找出python 3.6和python 3.8的位置:
# which python
/usr/bin/python
# ls -l /usr/bin/python
/usr/bin/python -> python3.8
# which python3
/usr/bin/python3
# ls -l /usr/bin/python3
/usr/bin/python3 -> python3.6
然后,更改软链接:
# rm /usr/bin/python3
# ln -s /usr/bin/python3.8 /usr/bin/python3
另外ln -s也可以链接大的文件夹
ln -s 存在的原大文件夹路径 想要的新路径
ln -s /project01/nuSences ./data/nuSences //即把/project01/nuSences链接到当前的data文件夹下