linux常用命令

环境变量

修改环境变量:vim /etc/profile 或者
查看环境变量:printenv PATH

软连接

ll -a /usr/bin/python
sudo rm -rf /usr/bin/python
sudo ln -s /usr/bin/python3.8 /usr/bin/python

Could not get lock

报错:Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarly unavailable)

原因:默认有apt-get运行
查看ps aux|grep apt-get

解决方法:运行
sudo rm /var/lib/dpkg/lock-frontend
sudo rm /var/lib/dpkg/lock

pip更换软件源

报错:Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError(’: Failed to establish a new connection: [Errno 101] Network is unreachable’,)': /simple/setuptools/
解决方法:
https://zhuanlan.zhihu.com/p/345161094

你可能感兴趣的:(Linux,linux)