Package installation commands
Package installation commands are used in CentOS to install and manage software packages on the system. The package management system in CentOS is called Yellowdog Updater Modified (YUM), and it provides a centralized method for managing and installing software packages.
YUM package management system
YUM is the default package manager for CentOS. It makes it easy to manage software packages by resolving dependencies and downloading required packages. With YUM, users can install new packages, update existing packages, and remove packages as needed. YUM provides a command line interface that allows users to manage packages from the terminal, as well as a graphical user interface for users who prefer a visual approach.
Common package installation commands
The most common commands used with YUM include yum install
to install a new package, yum update
to update an existing package, and yum remove
to remove a package. Additionally, yum list
can be used to list all available packages, and yum search
can be used to search for packages. It is important to remember that when using YUM to manage packages, it is necessary to have an active internet connection and to run the commands as root or with administrative privileges.
The following commands are the starting point of the 100 Linux Commands Every System Administrator Should Know journey:
yum upgrade
: Theyum upgrade
command is used in CentOS Linux to upgrade all installed packages to their latest available version. The command updates the system with the latest packages, bug fixes, and security patches, ensuring the system remains secure and stable. Theyum upgrade
command is executed in the terminal and it is executed with administrative privileges, usually as the root user. By running the command, the system will upgrade all installed packages and resolve any dependencies or conflicts that might arise during the upgrade process.
Figure 1.35 – Upgrading the server
yum update
: This package management tool is used in CentOS and other Linux distributions to upgrade and update system software packages. It downloads the latest package updates from a repository and installs them on the system, ensuring that your system has the most up-to-date security patches and bug fixes. Runningyum update
on a regular basis is an important part of system maintenance, as it helps keep your system secure and running smoothly.
Figure 1.36 – Updating the server
reboot
: This command is used to restart a computer running on a Unix-based operating system such as Linux. It is used to apply changes made to the system or to refresh the system after completing a process. The command can be executed by a user with root or superuser privileges. Upon executing the command, the system initiates a reboot sequence and all running processes are terminated. Then, the system is restarted. Thereboot
command is often used after completing a system update or upgrade to ensure the changes are applied.
Figure 1.37 – Rebooting the server