Home >Operation and Maintenance >Linux Operation and Maintenance >Installation, uninstallation and update of software in Linux system
What is a package management system?
A package management system consists of a set of tools and file formats that are used together to install, update, and uninstall Linux applications.
The two most common package management systems come from Red Hat
and Debian
. Ret Het, CentOS and Fedora all use RPM
(.rpm files), Debian, Ubuntu and Mint use DPKG
(.deb files).
Gentoo Linux uses a system called Portage
, Arch Linux only uses TARBALLS
(.tar files). The main difference between these systems is their approach to installing and maintaining applications.
You may be wondering what's inside a .rpm, .db or .tar file. You might be surprised to know that all of these files are just plain old archive files (like .zip) that contain the code for the application, instructions on how to install it, and dependencies (what other applications it might depend on ) and where the configuration file should be placed. The software that reads and executes all these instructions is called a package manager.
Online learning video tutorial sharing: linux video tutorial
Debian, Ubuntu, Mint, etc.
Debian, Ubuntu, Mint and other Debian-based distributions use .deb files and the DPKG package management system. There are two ways to install applications through this system: you can install them from a repository using the APT application, or you can install the application from a .deb file using the DPKG application.
The instructions to use apt to install an application are as follows:
$ sudo apt install app_name1
The instructions to use apt to uninstall an application are as follows:
$ sudo apt remove app_name1
If you want to upgrade the installed application, you first need to update the application Repository, the command is as follows:
$ sudo apt update1
After the update is completed, use the following command to update all applications:
$ sudo apt upgrade1
If you only want to update one app, enter the following command:
$ sudo apt update app_name1
Finally, assuming the application you want to install is not in the Debian repository, it can be downloaded as a .DEB. The command is as follows:
$ sudo dpkg -i app_name.deb
Red Hat, CentOS, and Fedora
By default, Ret Hat uses multiple package management systems. Although these systems use their own commands, there are still many similarities, and the same commands are used in Debian.
For example, we can use yum or dnf manager to install applications. The command is as follows:
$ sudo yum install app_name $ sudo dnf install app_name12
Applications in .rpm format can also be installed using the rpm command:
$ sudo rpm -i app_name.rpm1
The command to delete the application is as follows:
$ sudo yum remove app_name $ sudo dnf remove app_name12
The program can be upgraded through the following command Implementation:
$ yum update$ sudo dnf upgrade --refresh12
Recommended related articles and tutorials: linux tutorial
The above is the detailed content of Installation, uninstallation and update of software in Linux system. For more information, please follow other related articles on the PHP Chinese website!