Deb package installation for Linux software installation

deb is the package management method of the debian system, and ubuntu is the Linux distribution of the debian system.

One, local deb package installation

dpkg (Debian package) , a package management system specially developed for the "Debian" operating system, used for software installation, update and removal. All Linux distributions derived from "Debian" use dpkg.

dpkg -i 软件包名  #安装指定的deb包
dpkg -L 软件包名  #查看软件安装位置
dpkg -l 软件包名  #以列表形式显示软件包的版本、描述等信息
dpkg -s 软件包名  #显示软件包的详细信息
dpkg -r 软件包名  #卸载软件(保留配置)
dpkg -P 软件包名  #卸载软件(不保留配置)
dpkg -c 软件包名  #显示软件包的内容

Two, apt installation

apt (Advanced Packaging Tool) is an installation package management tool under Linux system. Usually the deb package is stored in the remote server in the form of a software source, the software source is set in the local system, and then the deb package is obtained and installed and managed

1. Software source

/etc/apt/sources.listThe software source of the deb package is stored in the file, and all the deb packages available for installation are stored in the software source.
The software source is provided by the official or some resource websites. By replacing or adding different software sources, more and richer deb packages can be provided.

hollowman@hollowman-F117:~$ cat /etc/apt/sources.list
deb http://mirrors.aliyun.com/ubuntu/ groovy main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ groovy-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ groovy-security main restricted universe multiverse

2. apt (upgraded version of apt-get tool) commonly used commands

apt update  #更新软件源中的所有软件列表
apt list --upgradeable  #显示可升级的软件包
apt list --installed  #显示已安装的软件包
apt upgrade  #一般在apt update更新完软件列表后,通过apt upgrade来升级软件包。
apt install [选项] 软件包名   #安装指定的软件包
apt install -f 软件包名  #修复软件包的依赖关系并自动安装所依赖的包
apt show 软件包名  #显示软件包的详细信息
apt remove 软件包名  #卸载指定的软件包
apt autoremove  #自动清理不再使用的依赖包和库文件

When using a non-system management user (root), usually add sudo in front

Guess you like

Origin blog.csdn.net/ymz641/article/details/112688551
Recommended