Tuesday, June 12, 2012

How to use RPM in Fedora Linux

RPM is used to build, install, query, verify, update, and erase individual software packages. It was originally designed to work with Red Hat / Fedora Linux. Currently it also works on other rpm-based distributions: Suse, Mandriva Linux, Conectiva and etc.

To install software packages, use the following command:
rpm -i foobar.rpm
To uninstall a software package:
rpm -e foobar.rpm

To list all installed packages:
rpm -qa
If the list is too long to be seen in one windows, you may pipe the list to less:
# rpm -qa | less
Like any other Unix command, you may use the --help to look for help in RPM.
rpm --help
Of course, the manual for RPM is available as:
man rpm

While the rpm command is good for installing a single RPM from local directory, the yum command is often the better choice for installing applications in Red Hat Linux / Fedora. Unlike RPM, Yum will help to automatically find all dependent packages.

No comments:

Post a Comment