What is the difference between sudo apt-get and yum installation

rpm package and deb package are the two most common installation package formats under Linux systems, and it is inevitable to deal with them when installing some software or services.The rpm package is mainly used on Linux systems of 
the RedHat series including Fedora and other distributions .
The deb package is mainly used in the Debian series, including the more popular distributions such as Ubuntu.
   
We know that if we want to install these two packages, the command to install the rpm package is "rpm - parameter", and the command to install the deb package is "dpkg - parameter". The Linux system is very convenient and user-friendly. Many software or services do not need to be downloaded by us at all, and can be managed directly by using the corresponding commands. Maybe this is the concept of the legendary "cloud".
 
yum can be used to run rpm packages, such as the management of certain software on Fedora systems:
Install: yum install <package_name>
Uninstall: yum remove <package_name>
更新:yum update <package_name>
apt-get can be used to run deb packages, such as the management of a software on an Ubuntu system: 安装:apt-get install <package_name> 卸载:apt-get remove <package_name> 更新:apt-get update <package_name>
  One, redhat install yum How to use YUM server to manage rpm package upgrade method in Linux Redhat 9.0 Since Redhat has stopped maintaining Linux Redhat 9.0, So we users have to find another way to upgrade the package, At this time, use the YUM server to manage the rpm package upgrade, because it can avoid the dependencies between packages and the installation fails. To connect to YUMThe server must first install the following programs: yum-2.0.4-1.rh.fr.i386.rpm This file can be downloaded from http://ayo.freshrpms.net/ website, this one file, and then go to "Terminal" Enter su and enter your root password. After entering root, enter the following command: rpm -ivh yum-2.0.4-1.rh.fr.i386.rpm After installing this program, you can use it Use the following commands to use the YUM server to manage rpm package upgrades. yum update upgrades your RPM package, this command is equivalent to apt-get update plus apt-get install. yum install installs a new RPM package. yum clean cleans up After completing the installation, unnecessary temporary programs. yum remove removes your RPM package. Second, the use of yum 1. Redhat's yum advanced package management 1). It is common to install and delete software with YUM. , yum is also competent for this task, as long as the software is installed by rpm. The installation command is yum install xxx, yum will query the database to see if there is such a package, and if so, check its dependency conflict. If there is no dependency conflict, then it is best to download and install it; if there is, it will give a prompt , asking if you want to install dependencies at the same time, or remove conflicting packages, you can decide for yourself. The command to delete is yum remove xxx. Like installation, yum will also query the database and give tips for resolving dependencies. 2). Use YUM to install the package command: yum install <package_name> 3). Use YUM to remove the package command: yum remove <package_name> Using YUM to query software information, we often encounter such a situation. If we want to install a software, we only know that it is related to a certain aspect, but we cannot know its name exactly. At this time, the query function of yum comes into play. You can use a command such as yum search keyword to search. For example, if we want to install an Instant Messenger, but we don’t know what it is, we may use a command such as yum search messenger to search, and yum will search for all available rpm descriptions. , list all the rpm packages related to messeger in the description, so we may get gaim, kopete, etc., and choose from them. Sometimes we also encounter a package installed, but do not know its purpose, we can use the command yum info packagename to get information. 4). Use YUM to find packages command: yum search <keyword> 5). List all installable packages command: yum list 6). List all updateable packages command: yum list updates 7). Column List all installed packages command: yum list installed 8). List all installed packages but not in Yum Repository command: yum list extras 9). List specified packages command: yum list <package_name> Third, the use of apt-get 1. The advanced package management method apt-get in Ubuntu In addition to the convenience of apt, one of the advantages of apt-get is that it greatly reduces the probability of the so-called dependency nightmare (dependency hell), even if it falls into dependency hell, apt -get also provides a good aid to help you escape from the cave. Usually apt-get comes along with tarballs on the Internet, downloaded or installed from the Internet. There are more than 200 official debian mirrors around the world, as well as numerous unofficial software packages. Depending on the Debian-based distribution you are using, the repositories you use may need to be manually selected or can be set automatically. You can get a complete list of mirrors from the official Debian website. While many unofficial websites provide unofficial packages for various special purposes, of course, there are more risks in using unofficial packages. Packages are prepared for a basic Debian distribution (unstable to stable) and are divided into different categories (eg main contrib nonfree) according to the debian free software program (that is, often said dfsg), because the United States restricts the export of encryption software, there is also a non-us category. 2. Commonly used APT command parameters apt-cache search package Search package apt-cache show package Obtain package related information, such as description, size, version, etc. sudo apt-get install package Install package sudo apt-get install package -- reinstall Install package sudo apt-get -f install fix install "-f= --fix-missing"Source code sudo apt-get clean && sudo apt-get autoclean Clean up useless packages sudo apt-get check Check for broken dependencies

Reprinted from: https://blog.csdn.net/lkeven/article/details/77100358

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325130809&siteId=291194637