O'Reilly logo

Linux Pocket Guide, 2nd Edition by Daniel J. Barrett

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Installing Software

You will probably want to add further software to your Linux system from time to time. The method of installation varies, however, because Linux has multiple standards for “packaged” software. Your distro might do installations on the command line, with one or more GUI tools, or both. The most common package types are:

*.deb files

Debian packages, used by Debian, Ubuntu, and other distros. We’ll cover the package manager aptitude for installing software in this format.

*.rpm files

RPM Package Manager files are used by Red Hat, Fedora, CentOS, and other distros. These are installed by the package managers yum, rpm, and on older systems, up2date.

*.tar.gz files, *.tar.Z files, and *.tar.bz2 files

Compressed tar files. This kind of file isn’t an installable “package” but a collection of files created by tar and compressed with gzip (.gz), bzip2 (.bz2), or compress (.Z). Whereas Debian and RPM packages can be installed with a single command, compressed tar files usually require multiple manual steps.

You must learn which package type is used by your Linux system. In general, you cannot (or should not) mix package types like Debian and RPM. Fortunately, modern Linux systems are usually set up with a package manager when initially installed, so all you need to do is use it.

Most new software must be installed by the superuser, so you’ll need to run the su command (or equivalent) before installation. For example:

$ su -l
Password: ********
# rpm -ivh mypackage.rpm
...etc... ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required