Linux administration

Package manager

Nguyen Hai Chau
Vietnam National University

Common backup managers

  • Different Linux distros have different package managers
  • RedHat, CentOS: yum
  • Debian, Ubuntu: dpkg or apt
  • Fedora: dnf (in the past: yum)
  • Oracle Linux: Based on RedHat, using yum

Common commands for package manager for RedHat-based systems

  • RedHat use yum and rpm to manage packages
  • All package management must be run under root user
  • Install a new package: yum install package_name
  • Reinstall an installed package: yum reinstall package_name
  • Remove an installed package: yum remove package_name
  • List installed packages: yum list installed
  • Read brief information of a package: yum info package_name
  • Search for packages: yum search text

Detailed information of a package

  • List of files in a package: rpm -ql package_name
  • Query file belonging to package: rpm -qf path_to_file
  • Install a package from a .rpm file: rpm -ivh path_to_rpm_file. This command is recommended when install software that is not included in distro's repository

Exercise

  • a. List of installed packages on your system
  • b. Search in the amanda package is available in the repository, and check if it is installed in your system
  • c. List files in yum package
  • d. What is the name of package containing /bin/ls file?