Yellowdog Updater Modified (yum)
RHEL ( Red Hat ) / CentOS / Fedora Linux 使用 yum 或 rpm
$ yum search string1 [string2] [...]
$ yum update [package1] [package2] [...]
$ yum install package1 [package2] [...]
$ yum list updates
$ yum list installed
or $ rpm -qa
http://www.cyberciti.biz/faq/rhel-centos-fedora-linux-yum-command-howto/
安裝(install) RPM 套件檔案
$ rpm -ivh rpm-package-file
移除(erase) 已安裝 RPM 套件
$ rpm -evh rpm-package
圖形介面
Pirut: Fedora Core 5, 6, 7, 8, and CentOS 5.x, and RHEL 5
PackageKit: Fedora 9, CentOS 6, RHEL 6 and newer
Advanced Packaging Tool (APT)
Use apt under Debian / Ubuntu
根據 /etc/apt/sources.list 更新 Apt database
$ sudo apt-get update
$ sudo apt-get install openssh-client
$ sudo apt-get remove openssh-client
安裝 Ubuntu (Debian) package (.deb)
$ sudo dpkg -i package.deb
移除 Ubuntu (Debian) package (.deb)
$ sudo dpkg -r package
How to install ps2pdf?
sudo dpkg -L ghostscript
-L: List files installed to your system from package.
sudo apt-get install ghostscript
$ rpm -q name