Linux: yum options you may not know exist.

Most of the users who work with distributions such as: centos, fedora, redhat, etc use yum as a package update/installer. Most of them know how to do “yum update [packagename]” (to update all or [certain packages]) or they do “yum install packagename” to install certain package(s). But yum can do so much more. Here are some options you may find useful:

Following command will search for the string you specified. Generally this will give you all of the packages which has specified string in title or description. Most of the time you will have to look through a lot of output to find what you are looking for.

yum search string

Probably one of the most important options for yum is provides/whatprovides. If you know what command you need, you can find out what package you have to install in order to have that command available to you.

yum provides (or whatprovides) command

Following command is same as above but with less output.

yum -d 1 provides command

So for example if you are trying to figure out what you need to install to use bunzip2, type:

yum -d 1 provides bunzip2

you will get a similar output as below.

# yum -d 1 provides bunzip2
bzip2.x86_64 1.0.2-13.EL4.3 base
bzip2.x86_64 1.0.2-13.EL4.3 base
man-pages-fr.noarch 0.9.7-13.el4 base
man-pages-ja.noarch 20050215-2.EL4.3 base
man-pages-pl.noarch 0.23-5 base

As you can see bunzip2 is part of bzip2 package. So now you can you just install bzip2.x86_64 to get bunzip2.

To learn more about what else is available, read man yum.

2 Responses to “ Linux: yum options you may not know exist. ”

  1. October 14th, 2008 | 3:20 pm

    If you’ve got a FC9 box around, you might enjoy taking a peak at pkcon, which supports yum repositories. pkcon is installed by default, and is what powers the updater icon that lives in your tray if you’ve got a desktop. (

    I haven’t really had enough opportunity to see if there’s anything concretely awesome about it, but it feels very fast, and I like the expanded options for searching.

    PackageKit Console Interface

    search [name|details|group|file] [data]
    install [packages|files]
    remove [package]
    resolve [package]
    get-depends [package]
    get-requires [package]
    get-details [package]
    get-files [package]
    get-update-detail [package]
    repo-enable [repo_id]
    repo-disable [repo_id]
    repo-set-data [repo_id] [parameter] [value];
    what-provides [search]

  2. Chirag
    August 10th, 2010 | 11:01 pm

    buddy i need a step by step yum configuration(ftp).for my RHEL5.0. do the needful

Leave a reply

To prove that you're not a bot, enter this code
Anti-Spam Image