Revision 24 as of 2007-12-01 14:33:42

Clear message

It is easy to apply your existing knowledge of Red Hat Enterprise Linux or Fedora to Ubuntu. The key differences between them are covered in this article.

Administrative Tasks

In Red Hat Enterprise Linux and Fedora by default, each administrative user needs to know the root password, in addition to their own password.

In Ubuntu, each user only has one password. Users in the admin group can run command line and graphical applications with elevated privileges. Graphical admin tools prompt for this password when run, and command line tools can be run with root-privileges using [:RootSudo:sudo].

Package Management

Ubuntu has more than three times as many packages available as Fedora ([http://desicritics.org/2007/04/16/001741.php reference]), so you'll have more chance of finding what you want in the repositories. Graphical applications will put a link into Ubuntu's Applications menu.

Graphical Tools

The Synaptic package Manager is an excellent tool for finding, fetching and installing packages. Press System -> Administration -> Synaptic Package Manager to start Synaptic.

Command Line Tools

Ubuntu uses apt-get instead of yum, up2date and so on to find, download, and install packages and their dependencies.

Note that, unlike yum, apt-get is only for packages available in repositories - it cannot handle packages you have already downloaded. The dpkg command is used instead.

Table of Equivalent Commands

Task

Red Hat/Fedora

Ubuntu

Adding, Removing and Upgrading Packages

Refresh list of available packages

Yum refreshes each time it's used

apt-get update

Install a package from a repository

yum install package_name

apt-get install package_name

Install a package file

yum install package.rpm BR rpm -i package.rpm

dpkg --install package.deb

Remove a package

rpm -e package_name

apt-get remove package_name

Check for package upgrades

yum check-update

apt-get -s upgrade BR apt-get -s dist-upgrade

Upgrade packages

yum update BR rpm -Uvh [args]

apt-get dist-upgrade

Upgrade the entire system

yum upgrade

apt-get dist-upgrade

Package Information

Get information about an available package

yum search package_name

apt-cache show package_name

Show available packages

yum list available

apt-cache dumpavail

List all installed packages

yum list installed BR rpm -qa

dpkg --list

Get information about an installed package

yum info package_name BR rpm -qi package_name

dpkg --status package_name

List files in an installed package

rpm -ql package_name

dpkg --listfiles package_name

List documentation files in an installed package

rpm -qd package_name

-

List configuration files in an installed package

rpm -qc package_name

-

Show the packages a given package depends on

-

apt-cache depends

Show other packages that depend on a BR given package (reverse dependency)

rpm -q -whatrequires [args]

apt-cache rdepends

Package File Information

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

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

Misc. Packaging System Tools

Show stats about the package cache

-

apt-cache stats

Verify all installed packages

rpm -Va

debsums

Remove packages from the local cache directory

yum clean packages

apt-get clean

Remove only obsolete packages from the local cache directory

-

apt-get autoclean

Remove header files from the local cache directory BR (forcing a new download of same on next use)

yum clean headers

apt-file purge

General Packaging System Information

Package file extension

*.rpm

*.deb

Repository location configuration

/etc/yum.conf

/etc/apt/sources.list

Some of the information in this table was derived (with permission) from [http://www.jpsdomain.org/linux/apt.html APT and RPM Packager Lookup Tables].

More technical information about Debian-style packaging can be found in [http://www.debian.org/doc/FAQ/ch-pkg_basics.en.html Basics of the Debian package management system] and the [http://www.debian.org/doc/manuals/maint-guide/index.en.html Debian New Maintainers' Guide].

Services

Services on Ubuntu are managed in a broadly similar way to those on Red Hat.

Graphical Tools

Services can be configured by clicking System -> Administration -> Services

There's also [http://www.marzocca.net/linux/bum.html Boot-Up Manager].

Command Line Tools

Task

Red Hat Enterprise / Fedora example (with Apache HTTPd)

Ubuntu example

Starting/stopping services immediately

service httpd start

/etc/init.d/apache start or service apache start (from sysvconfig package) or use sysv-rc-conf

Enabling a service at boot

chkconfig httpd on

sysv-rc-conf apache on or update-rc.d apache defaults

Disabling a service at boot

chkconfig httpd off

sysv-rc-conf apache off or update-rc.d apache purge

Note: Whereas Red Hat and Fedora's servers boot into runlevel 3 by default, Ubuntu servers default to runlevel 2.