Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 4. Searching for RHEL 8 content
In the following sections, learn how to locate and examine content in the AppStream and BaseOS repositories in Red Hat Enterprise Linux 8 by using YUM.
4.1. Searching for software packages Copier lienLien copié sur presse-papiers!
To identify which package provides the software you require, you can use YUM to search the repositories.
Procedure
Depending on your scenario, use one of the following options to search the repository:
To search for a term in the name or summary of packages, enter:
yum search <term>
$ yum search <term>Copy to Clipboard Copied! Toggle word wrap Toggle overflow To search for a term in the name, summary, or description of packages, enter:
yum search --all <term>
$ yum search --all <term>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note that searching additionally in the description by using the
--alloption is slower than a normal search operation.
4.2. Listing software packages Copier lienLien copié sur presse-papiers!
You can use YUM to display a list of packages and their versions that are available in the repositories.
Procedure
List the latest versions of all available packages, including architectures, version numbers, and the repository they where installed from:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The
@sign in front of a repository indicates that the package in this line is currently installed.Alternatively, to display all available packages, including version numbers and architectures, enter:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Optionally, you can filter the output by using other options instead of
--all, for example:-
Use
--installedto list only installed packages. -
Use
--availableto list all available packages. -
Use
--upgradesto list packages for which newer versions are available.
-
Use
You can filter the results by appending global expressions as arguments. For more information, see Specifying global expressions in yum input.
4.3. Listing repositories Copier lienLien copié sur presse-papiers!
To get an overview of repositories that are enabled and disabled on your system, you can list them.
Procedure
List all enabled repositories on your system,:
yum repolist
# yum repolistCopy to Clipboard Copied! Toggle word wrap Toggle overflow To display only certain repositories, append one of the following options to the command:
-
Append
--disabledto list only disabled repositories. -
Append
--allto list both enabled and disabled repositories.
-
Append
Optional: List additional information about the repositories:
yum repoinfo <repository_name>
# yum repoinfo <repository_name>Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteYou can filter the results by appending global expressions as arguments. For more information, see Specifying global expressions in yum input.
4.4. Displaying package information Copier lienLien copié sur presse-papiers!
You can query YUM repositories to display further details about a package, such as the following:
- Version
- Release
- Architecture
- Package size
- Description
Procedure
Display information about one or more available packages:
yum info <package_name>
# yum info <package_name>Copy to Clipboard Copied! Toggle word wrap Toggle overflow This command displays the information for the currently installed package and, if available, its newer versions that are in the repository.
You can filter the results by appending global expressions as arguments. For more information, see Specifying global expressions in yum input.
4.5. Listing package groups and packages they provide Copier lienLien copié sur presse-papiers!
Package groups bundle multiple packages, and you can use package groups to install all packages assigned to a group in a single step. However, before the installation, you must identify the name of the required package group.
Procedure
List both installed and available groups:
yum group list
# yum group listCopy to Clipboard Copied! Toggle word wrap Toggle overflow Note that you can filter the results by appending the
--installedand--availableoption to theyum group listcommand. By using the --hidden option, you can display hidden groups in the output.List mandatory, optional, and default packages contained in a particular group:
yum group info <group_name>
# yum group info <group_name>Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteYou can filter the results by appending global expressions as arguments. For more details, see Specifying global expressions in yum input.
Optional: View the number of installed and available groups:
yum group summary
# yum group summaryCopy to Clipboard Copied! Toggle word wrap Toggle overflow
4.6. Listing available modules and their contents Copier lienLien copié sur presse-papiers!
By searching for modules and displaying information about them with YUM, you can identify which modules are available in the repositories and select the appropriate stream before you install a module.
Procedure
List the module information in one of the following ways:
List all available modules:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Use the
yum module list <module_name>command to list the same information but only for a specific module.Search for which module provides a certain package:
yum module provides <package_name>
$ yum module provides <package_name>Copy to Clipboard Copied! Toggle word wrap Toggle overflow For example, to display which module and profiles provide the
npmpackage, enter:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Use one of these methods to list module details:
List all details about a module, including a description, list of all profiles, and a list of all packages the module provides:
yum module info <module_name>
$ yum module info <module_name>Copy to Clipboard Copied! Toggle word wrap Toggle overflow For example, to display details about the
nodejsmodule, enter:Copy to Clipboard Copied! Toggle word wrap Toggle overflow List which packages each module profile installs:
yum module info --profile <module_name>
$ yum module info --profile <module_name>Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteEach of the profiles installs a different set of packages, including their dependencies.
For example, to display this information for the
nodejsmodule, enter:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
4.7. Specifying global expressions in YUM input Copier lienLien copié sur presse-papiers!
You can filter the results of yum commands by appending one or more global expressions as arguments.
Procedure
Use one of the following methods if you use global expressions in yum commands:
Enclose the entire global expression in single or double quotation marks:
yum provides "*/<file_name>"
# yum provides "*/<file_name>"Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note that you must precede
<file_name>either by a backslash (/) character for an absolute path or*/to use a wildcard if the full path is unknown.Escape the wildcard characters by preceding them with a backslash (
\) character:yum provides \*/<file-name>
# yum provides \*/<file-name>Copy to Clipboard Copied! Toggle word wrap Toggle overflow