This article of the VPS Admin commands commonly found in Red Hat, Fedora, Ubuntu. You can look at the table below to compare when used.
In Ubuntu primarily use the command
apt-get
In CentOS/Fedora primarily use the command
yum
Task Red Hat/Fedora Ubuntu
New install, remove and Update Packages
Refresh the list and repository automatically when running Yum command apt-get update
To install a package from a repository ten_package yum install apt-get install ten_package
Install from a file yum install package.rpm
rpm-i package.deb install dpkg package.rpm
Remove a package rpm-e ten_package apt-get remove ten_package
Check for new version updates yum check-update apt-get-s upgrade
apt-get dist-upgrade-s
Updated version of yum update
rpm-Uvh [args] apt-get upgrade
Updated yum kernel upgrade apt-get dist-upgrade
Check a Package
Looking for information about a package yum search ten_package apt-cache search ten_package
Enumerated list of package yum list available apt-cache dumpavail
List the installed package yum list installed
rpm-qa dpkg list
Check the information about a package yum info ten_package apt-cache show ten_package
Check the information about a package already installed rpm-qi ten_package dpkg-status ten_package
The list of files in a package already installed rpm-ql ten_package dpkg-ten_package listfiles
A list of the configuration file of an installed rpm packages-qc ten_package dpkg-query-show-f ‘ $ {Conffiles} \n ‘ ten_package
List of package is installed with package rpm-qR ten_package apt-cache depends
Information from a file
Search package from a file rpm-qf filename dpkg – search filename
The command works with the system
Statistical information cache-apt-cache stats
Removed package + all hard disk cache yum clean packages apt-get clean
Repository location configuration/etc/yum.conf/etc/apt/sources.list
The command works with apache
Start/stop service httpd start/stop/restart httpd start/stop/restart
System boot chkconfig httpd on update-rc. d: apache defaults
Remove chkconfig httpd system startup off update-rc. d: apache purge
Leave a Reply