Below is a table of equivalent commands for package management on both Ubuntu/Debian and Red Hat/Fedora systems.
Task |
Red Hat/Fedora |
Ubuntu |
Adding, Removing and Upgrading Packages |
||
Refresh list of available packages |
Yum refreshes each time it's used |
apt-get update |
Install a package from a repository |
yum install package_name |
apt-get install package_name |
Install a package file |
yum install package.rpm |
dpkg --install package.deb |
Remove a package |
rpm -e package_name |
apt-get remove package_name |
Check for package upgrades |
yum check-update |
apt-get -s upgrade |
Upgrade packages |
yum update |
apt-get upgrade |
Upgrade the entire system |
yum upgrade |
apt-get dist-upgrade |
Package Information |
||
Get information about an available package |
yum search package_name |
apt-cache search package_name |
Show available packages |
yum list available |
apt-cache dumpavail |
List all installed packages |
yum list installed |
dpkg --list |
Get information about a package |
yum info package_name |
apt-cache show package_name |
Get information about an installed package |
rpm -qi package_name |
dpkg --status package_name |
List files in an installed package |
rpm -ql package_name |
dpkg --listfiles package_name |
List documentation files in an installed package |
rpm -qd package_name |
- |
List configuration files in an installed package |
rpm -qc package_name |
dpkg-query --show -f '${Conffiles}\n'package_name |
Show the packages a given package depends on |
rpm -qR package_name |
apt-cache depends |
Show other packages that depend on a |
rpm -q -whatrequires [args] |
apt-cache rdepends |
Package File Information |
||
Get information about a package file |
rpm -qpi package.rpm |
dpkg --info package.deb |
List files in a package file |
rpm -qpl package.rpm |
dpkg --contents package.deb |
List documentation files in a package file |
rpm -qpd package.rpm |
- |
List configuration files in a package file |
rpm -qpc package.rpm |
- |
Extract files in a package |
rpm2cpio package.rpm | cpio -vid |
dpkg-deb --extract package.deb dir-to-extract-to |
Find package that installed a file |
rpm -qf filename |
dpkg --search filename |
Find package that provides a particular file |
yum provides filename |
apt-file search filename |
Misc. Packaging System Tools |
||
Show stats about the package cache |
- |
apt-cache stats |
Verify all installed packages |
rpm -Va |
debsums |
Remove packages from the local cache directory |
yum clean packages |
apt-get clean |
Remove only obsolete packages from the local cache directory |
- |
apt-get autoclean |
Remove header files from the local cache directory |
yum clean headers |
apt-file purge |
General Packaging System Information |
||
Package file extension |
*.rpm |
*.deb |
Repository location configuration |
/etc/yum.conf |
/etc/apt/sources.list
|
相关推荐
这两个最大的区别在包管理模式... Redhat主要集中在 企业级服务器版的制作是推动LINUX商业化最成功的公司 Redhat对应的桌面版制作都是由Fedora社区研发了 Ubuntu桌面版 适合初学者 使用比较简单,桌面用户的首选Ubuntu
linux(redhat+ubuntu)安装教程+图解
NULL 博文链接:https://netbs.iteye.com/blog/2102207
常见包管理器一、rpm包管理器二、yum-基于RPM的软件包管理器三、dnf- 新一代的RPM软件包管理器四、linux centos/redhat 小结 环境说明: 博客使用的linux版本:CentOS Linux release 7.7.1908 (Core) 终端汉化:...
redHat和ubuntu区别,1....可是:RedHat.Enterprise.Linux.5 与 redhat linux 9.0 还有redhat fedora core 三者之间的具体关联和区别是什么? centos又是从哪冒出来的,我们公司用的就是centos,这个好吗,好在哪里?
red hat Linux 命令 大全
linux(RedHat)抓包及ethereal抓包工具的使用方法借鉴.pdf
RedHat Linux服务器操作系统常用命令
linux开启文件共享
RedHat Linux安装图解RedHat Linux安装图解RedHat Linux安装图解RedHat Linux安装图解
redhat linux 服务器管理与应用
Redhat linux常用的命令以及一些常见问题的解决。
RedHat linux as 3 集群管理指南,中文版
redhat和ubuntu区别RedHat.Enterprise.Linux.5 与 redhat linux 9.0 还有redhat fedora core 三者之间的具体关联和区别是什么? centos又是从哪冒出来的,我们公司用的就是centos,这个好吗,好在哪里?
Linux Bible RedHat.rar
linux系统安装redhat5,按照文档上面进行安装正常,已经装过好几个了。
linux入门教程_Redhat使用指南
安装redhat linux以后需要安装附件的包才能支持中文,否则中文会显示乱码。 请按照如下步骤安装: rpm -ivh libFS-1.0.0-3.1.x86_64.rpm rpm -ivh ttmkfdir-3.0.9-23.el5.x86_64.rpm rpm -ivh chkfontpath-1.10.1-...
linux(redhat unbuntu ) 的一些教程,希望各大家帮助。