软件安装
1、查看已经安装的软件包
dpkg -l |grep openssh
2、卸载软件包
sudo dpkg --remove opera
3、rpm包管理
sudo rpm -ivh *.rpm(安装)
sudo rpm -Uvh *.rpm(升级)
rpm -q check(查看已经安装了的软件)
rpm -qa(查看所有的软件)
sudo rpm -e check(删除)
4、apt
sudo apt-get update(更新软件包信息)
sudo apt-get wesnoth(安装wesnoth)
sudo apt-get install 下载并安装软件包
sudo apt-get upgrade 下载并安装在本系统上已经有的软件包的最新版本
sudo apt-get remove 卸载特定的软件包
sudo apt-get source 下载特定的软件源代码
sudo apt-get clean 删除所有已下载的包文件
apt-cache search * 查找软件
5、python 升级安装(参考:https://www.cnblogs.com/lemon-le/p/13419429.html)
# 我也使用的wget ,我下载到了home中 wget https://www.python.org/ftp/python/3.9.0/Python-3.9.0.tgz # 每次都需要重新 在home中解压,否则可能不干净 tar -zxf Python-3.9.0.tgz # 进入python3.9 cd Python-3.9.0 # 编译文件 时间大概有1-3分钟(可能--with-openssl=/usr/local/openssl) sudo ./configure --prefix=/usr/local/python3 --with-openssl=/usr/include/openssl # 编译好后,会有另外一个提示,让run ./configure xxx sudo ./configure --enable-optimizations # 安装 sudo make && make install # 结束
安装其他包
pip install xxx -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
豆瓣(douban) http://pypi.douban.com/simple/
阿里云 http://mirrors.aliyun.com/pypi/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/
6、切换python版本
$ sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 2 # 添加Python2可选项,优先级为2
$ sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.4 1 #添加Python3可选项,优先级为1
sudo update-alternatives --config python 选择序号
$ sudo update-alternatives --remove python /usr/bin/python2.7 删除

浙公网安备 33010602011771号