Professional Documents
Culture Documents
rpm -qc: List just the configuration files installed by the package
rpm -qd: List just the documentation files installed by the package
rpm -q --scripts: List shell scripts that run before or after the package is installed or removed
The rpm command can also be used to install an RPM package that you have downloaded to
your local directory.
Installed packages can be queried directly with the rpm command. Add the -p option to
query a package file before installation.
Command Task
rpm -qa List all RPM packages currently installed
rpm -q NAME Display the version of NAME installed on the system
rpm -qi NAME Display detailed information about a package
rpm -ql NAME List all files included in a package
rpm -qc NAME List configuration files included in a package
Command Task
rpm -qd NAME List documentation files included in a package
rpm -q --changelog
Show a short summary of the reason for a new package release
NAME
Display the shell scripts run on package installation, upgrade, or
rpm -q --scripts NAME
removal
View the script that runs when the rhcsa-script-1.0.0-1.noarch.rpm package is installed or
uninstalled.
Use the rpm2cpio and cpio -tv commands to list the files in the rhcsa-script-1.0.0-
1.noarch.rpm package.
yum search KEYWORD lists packages by keywords found in the name and summary fields
only.
To search for packages that have “web server” in their name, summary, and description
fields, use search all:
yum info PACKAGENAME returns detailed information about a package, including the disk
space needed for installation.
yum provides PATHNAME displays packages that match the path name specified (which often
include wildcard characters).
yum install PACKAGENAME obtains and installs a software package, including any
dependencies.
yum update PACKAGENAME obtains and installs a newer version of the specified package, including
any dependencies
Like yum list, the yum group list command shows the names of installed and available
groups.
yum group info displays information about a group. It includes a list of mandatory, default,
and optional package names.
yum group install installs a group that installs its mandatory and default packages and the
packages they depend on.
yum-config-manager --add-
repo="http://dl.fedoraproject.org/pub/epel/8/x86_64/"
The following command installs the Red Hat Enterprise Linux 8 EPEL repository package:
Examine the software repository file created by the previous command in the /etc/yum.repos.d
directory.
[rht-updates]
name=rht updates
baseurl=http://content.example.com/rhel8.0/x86_64/rhcsa-practice/errata
enabled=1
gpgcheck=0
Use the yum repolist all command to list all repositories on the system:
Verify that the rht-system package is installed, and note the version number of the package.
Verify that the rht-system package is upgraded, and note the version number of the
package.
Modules
[user@host ~]$ yum module list
user@host ~]$ yum module list perl
[user@host ~]$ sudo yum module install perl
To verify the status of the module stream and the installed profile:
Use the yum module list --installed command to list installed modules and streams.
On serverb configure a software repository to obtain updates. Name the repository as errata and
configure the repository in the /etc/yum.repos.d/errata.repo file. It should access
http://content.example.com/rhel8.0/x86_64/rhcsa-practice/errata. Do not check
GPG signatures.
[errata]
name=Red Hat Updates
baseurl=http://content.example.com/rhel8.0/x86_64/rhcsa-practice/errata
enabled=1
gpgcheck=0
On serverb, install new package xsane-gimp and the Apache HTTP Server module from the 2.4
stream and the common profile.