CentOS & Ubuntu 命令对照

rpm & dpkg

Desc CentOS Ubuntu
安装本地包 rpm -ivh package dpkg -i package
卸载本地宝 rpm -e package dpkg -r package
列出已安装包 rpm -qa dpkg -l
列出包内容 rpm -ql package dpkg -L package
文件来自哪个包 rpm -qf file dpkg -S file

yum && apt

Desc CentOS Ubuntu
生成仓库缓存 yum repolist apt-get update
安装包 yum install package apt-get install package
卸载包 yum remove package apt-get remove package
搜索包 yum list\ grep package apt-cache search package
查看包有哪些版本 yum list\ grep package apt-cache madison package
升级包 yum update package apt-upgrade package=version

results matching ""

    No results matching ""