In my previous post I covered some tips about using apt and dpkg, Debian-based package tools. Red Hat/Fedora-based distributions also have useful sets of command line tools for package management, namely rpm and yum. Some of the tools work in a similar fashion, some have other features. I'm just going to cover the ones I've found handy. Querying if a package is installed rpm -qa | grep inkscape Similar to the dpkg command, rpm can list all (or in this case query all - qa) packages. Using pipe | and the grep command we can search for a particular package, in this case inkscape. I sometimes also use the redirection symbol to redirect a query all listing to a text file. e.g. rpm -qa | grep graphics > textfilename.text In the example above I query all the packages and use the grep command to pattern match for the word graphics. Any package that has the word graphics in the description or filename will have its filename inserted into textfilename.text - which I can read with vi, gedit, or another editor. Querying what a package is Sometimes you want to know more information about an installed package. e.g. rpm -qi inkscape The result looks something like:
Installing Software As you may have noticed rpm acts much like dpkg. It's possible to install software with both rpm and dpkg on their respective systems, but often what happens is something we lovingly know as dependency hell. The gist of dependency hell is that software packages usually depend on other software packages. Apt and yum will install packages that other packages depend on, but rpm and dpkg do not. yum install inkscape Searching for Software to install Just as you can install software from yum, it also can be used to search for software, much like the debian apt-cache command: yum search vector The example above will search for the word vector in the package. These are just a few examples of useful commands under rpm-based systems. Many distributions feature different graphical tools, but the command-line tools are normally the same between rpm-based distributions, and therefore are quite handy to know.
Cheers,
Charles |
|||


