Linux Ubuntu Shell命令(软件安装)

软件安装命令

dpkg工具集(不会下载对应的依赖集,不好用)

  1. Ubuntu支持.deb结尾的安装包
  2. Redhat支持.rpm结尾的安装包
  3. 命令:
//1.安装:
  sudo dpkg -i 安装包名
  sudo dpkg -i vsftpd_3.0.2-1ubuntu2_i386.deb//使用实例
//2.查看是否安装成功
  dpkg -l 软件名
//3.卸载
  sudo dpkg -p 软件名

apt -get工具集(可以直接从网上下载,也可以分析软件依赖关系)

功能 语法 实例
更新软件包信息库,保持最新信息 sudo apt-get upda
更新所有已安装软件包至最新版本 sudo apt-get upgrade
安装软件包 sudo apt-get install 软件名 sudo apt-get install git
删除软件 sudo apt-get remove 软件名 sudo apt-get remove git
删除依赖文件的软件以及配置文件 sudo apt-get autoremove
清理缓存 sudo apt-get clean

配置apt工具集的源

  1. 打开Ubuntu Software
  2. 点击左上角Ubunte Software
  3. 点击“Software & Update”
  4. 将Download From选择ali源或者华为源
  5. 执行命令:
//1.清除旧源
sudo apt-get autoclean
//2.更新新源
sudo apt-get update
//3.重建软件源依赖关系
sudo apt-get install -f