gxk (gxk) wrote in os_kernel_il,
gxk
gxk
os_kernel_il

  • Mood:

Fedora and Ubuntu administration (packages and services)


Task
Using RHEL or Fedora
Using Ubuntu
Refresh list of available packages
Yum refreshes each time it's used
apt-get update
Fetch and install a package (and any dependencies)
yum install package
apt-get install package
Get information about an available package
yum search package
apt-cache show package
Show available packages
yum list available
apt-cache dumpavail
List all installed packages

yum list installed
rpm -qa

dpkg --list
Get information about an installed package

yum info packagename
rpm -qi packagename

dpkg --status packagename
List files in an installed package
rpm -ql pkgname
dpkg --listfiles pkgname
List documentation files in an installed package
rpm -qd pkgname
?
List configuration files in an installed package
rpm -qc pkgname
?
Get information about a package file
rpm -qpi package.rpm
dpkg --info package.deb
List files in a package file
rpm -qpl package.rpm
dpkg --contents package.deb
List documentation files in a package file
rpm -qpd package.rpm
?
List configuration files in a package file
rpm -qpc package.rpm
?
Extract files in a package
rpm2cpio package.rpm |cpio -vid
dpkg-deb --extract package.deb dir-to-extract-to
Install a package file

yum install package.rpm
rpm -i package.rpm

dpkg --install package.deb
Remove a package
rpm -e pkgname
apt-get remove pkgname
Find package that installed a file
rpm -qf filename
dpkg --search filename
Find package that provides a particular file
yum provides filename
apt-file search filename

The link to source is here

Tags: linux admin
  • Post a new comment

    Error

    default userpic
  • 0 comments