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:

1.
Make sure you are working as the root user; use the su command if necessary to become root.
2.
Make the directory containing the .rpm files you want to install your current working directory.
3.
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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.