linux中软件安装与卸载

Linux 软件安装与卸载:apt/yum/dnf 包管理器、源码编译、pip/npm 安装。

写在前面:合法学习边界

本文讲 Linux 基础操作,不涉及攻击。

一、包管理器

包管理器
1
apt(Debian/Ubuntu)· yum(CentOS 6/7)· dnf(CentOS 8+)

二、常用命令

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# apt
apt update · apt install nginx · apt remove nginx · apt purge nginx

# yum
yum install nginx · yum remove nginx · yum info nginx

# 源码编译
./configure → make → make install

# pip
pip install package · pip uninstall package

三、小结

不同发行版使用不同包管理器。掌握 apt/yum/dnf 基本操作是 Linux 运维的基础。

本站使用「署名 4.0 国际」创作共享协议,可自由转载、引用,但需署名作者且注明文章出处
最后更新于 Aug 30, 2026 10:00 +0800