Useful Linux Commands - Part 8

The following are a list of commonly used Linux Administration Commands.

Common Package Manager Commands

Debian based systems such as Debian, Ubuntu and Linux Mint use the "dpkg" and "apt" package managers.

Red Hat based systems such Red Hat Enterprise Linux, CentOS and Oracle Linux use "rpm", "yum" and "dnf" package managers.

For more details regarding Linux package Managers, click the following link: Package Managers

Linux Command Description
dpkg -l package Displays package information for specified package
dpkg -i package Install package package
dpkg -r package Remove package package
dpkg --get-selections Display only installed packages
apt-get install package Install package
apt-get remove package Remove package
apt-get update Update package files
zypper se package Search for installed package
zypper in package Install package
zypper remove package Remove package
rpm -qa package Check for installed package package
rpm -Uhv package Upgrade or install package
rpm -ev package Remove package
yum list installed Display packages installed
yum list available Display packages that can be installed from your repositories
yum install package Installs package
yum remove package Removes package
dnf list installed Display packages installed
dnf list available Display packages that can be installed from your repositories
dnf install package Installs package
dnf remove package Removes package