ubuntu安装软件常用命令
ubuntu安装各种文件包.deb文件1、安装2、卸载apt安装与卸载1、ubuntu换源2、安装3、卸载ubuntu安装各种安装包.deb文件1、安装安装deb文件,在deb文件目录下ctrl+alt+t打开终端:sudo dpkg -i ***.deb如果报错依赖关系有问题:sudo apt-get -f install2、卸载查看dpkg文件安装目录,找到要卸载的文件名:sudo dpkg
·
ubuntu安装各种安装包
.deb文件
1、安装
安装deb文件,在deb文件目录下ctrl+alt+t打开终端:
sudo dpkg -i ***.deb
如果报错依赖关系有问题:
sudo apt-get -f install
2、卸载
查看dpkg文件安装目录,找到要卸载的文件名:
sudo dpkg -l
卸载dpkg文件:
sudo dpkg -r 软件名
apt安装与卸载
1、ubuntu换源
更换ubuntu的软件源,推荐阿里源。
首先备份原来的软件源:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
打开ubuntu的软件源文件:
sudo gedit /etc/apt/sources.list
将文件中的所有原内容删除,然后替换为以下阿里源:
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
然后将软件更新包里的软件列表更新:
sudo apt-get update
更新版本较低的软件:
sudo apt-get upgrade
2、安装
当确定需要apt安装相应软件时:
sudo apt-get install ***
需要安装对应版本的软件时:
sudo apt-get install ***==1.5.0
apt与apt-get在很多时候是兼容的,但是并不能完全替代。
3、卸载
remove命令卸载软件,保留配置文件:
sudo apt-get remove ***
purge命令彻底删除软件和配置文件:
sudo apt-get purge ***
自动清理不需要的软件包
sudo apt-get autoremove
更多推荐
所有评论(0)