Linux Installers Flashcards
apt basics
apt reads /etc/apt/sources.list
which contains repositories
apt directs installations/uninstallations to dpkg
Update the local apt cache with listing of packages, so to search for packages later on from this apt-cache
apt-get update
Upgrade packages that have upgrades available
apt-get upgrade
Install/remove packages with apt
Remove conf files that left after removing a package
apt-get install apache2
apt-get remove apache2
apt autoremove
Remove the package with its conf files with apt
apt-get purge chromium-browser
Upgrade all packages up to the next release with apt-get
apt-get dist-upgrade
so all new necessary packages will be installed while upgrading the current package
Download a package but not install this with apt
apt-get download htop
Search for packages with apt
apt-cache search apache
List basic info about a package with apt
apt-cache show apache2
List detailed info about a package with apt
apt-cache showpkg apache2
Display detailed info on a package with dpkg
Display basic info on a package with dpkg
- dpkg –info htop_2.01.deb
2. dpkg –status htop_2.01.deb
List packages that match the string provided with dpkg
dpkg -l nano
Install package with dpkg
Remove package
dpkg -i htop_2.01.deb
dpkg -r htop
List all files installed with dpkg package
dpkg -L htop
Remove package with dpkg with conf files
dpkg -P nano
Search through package DB for a file specified with dpkg
dpkg -S nano
Allows to modification of deb package by re-running app’s configuration tool
dpkg-reconfigure console-setup
Yum global conf file
Yum’s repositories
Yum cash location of latest requests
/etc/yum.conf
/etc/yum.repos.d/
/var/cache/yum
Search online repos with updates to upgrade packages with yum
yum update
Search for specific package with yum
yum search httpd
Get info about specific package with yum
yum info httpd
Display all packages installed by yum
yum list installed | grep httpd
Clean yum cache info and its local db file
yum clean all
Install/remove/reinstall app with yum
yum -y install httpd
yum remove httpd
yum reinstall httpd
Remove package and it dependencies with yum
yum autoremove httpd
Find with yum what package provides a specified file name
yum whatprovides */htpd
Download a package with yum
yum install yum-utils
yumdownloader htop
Rpm DB location
/var/lib/rpm
Repair corrupted rpm db
rpm –rebuilddb
List files in rpm package
List files in app
rpm -qpl htop.2.2.0.rpm
rpm -ql htop
Display info on rpm package
rpm -qpi htop.2.2.0.rpm
the info as yum info htop would provide
List all rpm packages installed on a system
rmp -qa
the same as yum list installed would provide
Install a package with rpm
Upgrade the package with a newer version
rpm -i htop.2.2.9.rpm or rpm -ivh htop.2.2.9.rpm
rpm -U htop.2.3.1.rpm
Uninstall rpm package
rpm -e htop
Verify installed rpm packages
rpm -Va
Query if rpm package is installed
rpm -q htop
List conf files of rpm package
rpm -qc sysstat