initCommon(); $template->displayHeader(); ?>

5. Searching for Packages with yum

Use the search features of yum to find software that is available from the configured repositories, or already installed on your system. Searches automatically include both installed and available packages.

The format of the results depends upon the option. If the query produces no information, there are no packages matching the criteria.

5.1. Searching by Package Name and Attributes

To search for a specific package by name, use the list function. To search for the package tsclient, use the command:

su -c 'yum list tsclient'

Enter the password for the root account when prompted.

To make your queries more precise, specify packages with a name that include other attributes, such as version or hardware architecture. To search for version 0.132 of the application, use the command:

su -c 'yum list tsclient-0.132'
[Note]Valid Package Attributes

Refer to Section 2.4, “Understanding Package Names” for information on package name formats and the attributes that they include.

5.2. Advanced Searches

If you do not know the name of the package, use the search or provides options. Alternatively, use wild cards with any yum search option to broaden the search criteria.

The search option checks the names, descriptions, summaries and listed package maintainers of all of the available packages to find those that match. For example, to search for all packages that relate to Palm Pilots, type:

su -c 'yum search PalmPilot'

Enter the password for the root account when prompted.

The provides function checks both the files included in the packages and the functions that the software provides. This option requires yum to download and read much larger index files than with the search option.

To search for all packages that include files called libneon, type:

su -c 'yum provides libneon'

To search for all packages that either provide a MTA (Mail Transport Agent) service, or include files with mta in their name:

su -c 'yum provides MTA'

For each command, at the prompt enter the password for the root account.

Use the standard wild-card characters to run any search option with a partial word or name: ? to represent any one character, and * to mean zero or more characters. Always add the escape character (\) before wild-cards.

To list all packages with names that begin with tsc, type:

su -c 'yum list tsc\*'

5.3. Understanding Matches

Searches with yum show all of the packages that match your criteria. Packages must meet the terms of the search exactly to be considered matches, unless you use wild-cards.

For example, a search query for shadowutils or shadow-util would not produce the package shadow-utils. This package would match and be shown if the query was shadow-util\?, or shadow\*.

displayFooter('$Date: 2006/05/25 02:44:31 $'); ?>