Using the rpm Command

The rpm command provides a way for packages to be installed or removed at the command line. It also provides several additional package management options that the desktop tools don't provide.

Installing RPM Packages with rpm

To install a package using the rpm command at the Linux command line, follow these steps:

Make sure you are working as the root user; use the su command if necessary to become root.
Make the directory containing the .rpm files you want to install your current working directory.
Enter the rpm command with the -i (install) option, supplying the name of the package you want to install as an argument.

For example, assuming that you are working as root and want to install a package called mypackage.rpm ...

Get SAMS Teach Yourself Red Hat® Fedora™ 4 Linux® All in One now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.