YouTip LogoYouTip

Linux Comm Rpm

Linux rpm Command

Image 1: Linux Command Manual Linux Command Manual

The Linux rpm command is used to manage packages.

rpm (full name in English: redhat package manager) was originally a program specifically designed for Red Hat Linux distributions to manage Linux packages. Because it follows GPL rules and is powerful, convenient, it became widely popular. It has gradually been adopted by other distributions. The appearance of the RPM package management method made Linux easy to install and upgrade, indirectly improving Linux's applicability.

Syntax

rpm [-b<completion stage><package file>+][-e<package file>][-f<file>+][-i<package file>][-p<package file>+][-U<package file>][--addsign<package file>+][--buildroot<root directory>][--checksig<package file>+][--dbpath<database directory>][--excludepath<excluded directory>][--ftpproxy<host name or IP address>][--ftpport<communication port>][--httpproxy<host name or IP address>][--httpport<communication port>][--pipe<executed command>][--prefix<destination directory>][--queryformat<header format>][--rcfile<configuration file>][--rebulid<package file>][--recompile<package file>][--relocate<original directory>=<new directory>][--resign<package file>+][--rmsource<file>][--root<root directory>][--target=<installation platform>+][--timecheck<check seconds>][--triggeredby<package file>][--whatprovides<feature>][--whatrequires<feature>]

Parameter Description:

  • -a Query all packages.
  • -b<completion stage><package file>+ or -t <completion stage><package file>+ Set the completion stage for building the package and specify the file name of the package file.
  • -c List only configuration files. This parameter must be used with the "-l" parameter.
  • -d List only text files. This parameter must be used with the "-l" parameter.
  • -e<package file> or --erase<package file> Delete the specified package.
  • -f<file>+ Query the package that owns the specified file.
  • -h or --hash Display markers during package installation.
  • -i Display information about the package.
  • -i<package file> or --install<package file> Install the specified package file.
  • -l Display the file list of the package.
  • -p<package file>+ Query the specified RPM package file.
  • -q Use query mode; when encountering any problem, the rpm command will first ask the user.
  • -R Display dependency information of the package.
  • -s Display file status. This parameter must be used with the "-l" parameter.
  • -U<package file> or --upgrade<package file> Upgrade the specified package file.
  • -v Display the command execution process.
  • -vv Display the command execution process in detail for troubleshooting.
  • --addsign<package file>+ Add a new signature authentication to the specified package.
  • --allfiles Install all files.
  • --allmatches Delete files contained in the specified package.
  • --badreloc Reconfigure files when an error occurs.
  • --buildroot<root directory> Set the directory to be used as the root directory when generating the package.
  • --changelog Display the change log of the package.
  • --checksig<package file>+ Verify the signature authentication of the package.
  • --clean Delete directories created during the packaging process after completing the package build.
  • --dbpath<database directory> Set the directory where the RPM database is to be stored.
  • --dump Display verification information for each file. This parameter must be used with the "-l" parameter.
  • --excludedocs Do not install documentation when installing the package.
  • --excludepath<excluded directory> Ignore all files in the specified directory.
  • --force Force replacement of a package or file.
  • --ftpproxy<host name or IP address> Specify an FTP proxy server.
  • --ftpport<communication port> Set the communication port used by the FTP server or proxy server.
  • --help Online help.
  • --httpproxy<host name or IP address> Specify an HTTP proxy server.
  • --httpport<communication port> Set the communication port used by the HTTP server or proxy server.
  • --ignorearch Do not verify the structural correctness of the package file.
  • --ignoreos Do not verify the structural correctness of the package file.
  • --ignoresize Do not check if disk space is sufficient before installation.
  • --includedocs Install documentation along with the package.
  • --initdb Confirm that a correct database is available.
  • --justdb Update the database without making any file changes.
  • --nobulid Do not execute any completion stages.
  • --nodeps Do not verify the interdependencies of the package file.
  • --nofiles Do not verify file attributes.
  • --nogpg Skip all GPG signature authentication.
  • --nomd5 Do not use MD5 encoding to verify file size and correctness.
  • --nopgp Skip all PGP signature authentication.
  • --noorder Do not re-sequence package installation order to satisfy their dependencies.
  • --noscripts Do not execute any installation script files.
  • --notriggers Do not execute any script files within the package.
  • --oldpackage Upgrade to an older version of the package.
  • --percent Display the completion percentage during package installation.
  • --pipe<executed command> Create a pipe and redirect the output to the input data of the executed command.
  • --prefix<destination directory> If reconfiguring files, place them in the specified directory.
  • --provides Query the compatibility provided by the package.
  • --queryformat<header format> Set the display format for the header.
  • --querytags List tags available for header format.
  • --rcfile<configuration file> Use the specified configuration file.
  • --rebulid<package file> Install the source code package and regenerate the binary package.
  • --rebuliddb Rebuild a database based on the existing database.
  • --recompile<package file> The effect of this parameter is similar to specifying the "--rebulid" parameter, but does not generate a package file.
  • --relocate<original directory>=<new directory> Move files that would have been placed in the original directory to the new directory.
  • --replacefiles Force file replacement.
  • --replacepkgs Force package replacement.
  • --requires Query the compatibility required by the package.
  • --resign<package file>+ Delete existing authentication and regenerate the signature authentication.
  • --rmsource Delete source code after completing the package build.
  • --rmsource<file> Delete source code and the specified file.
  • --root<root directory> Set the directory to be used as the root directory.
  • --scripts List the script variables for installing the package.
  • --setperms Set file permissions.
  • --setugids Set file owner and group.
  • --short-circuit Skip the steps of the specified completion stage directly.
  • --sign Generate a PGP or GPG signature authentication.
  • --target=<installation platform>+ Set the installation platform for the generated package.
  • --test Only test, do not actually install the package.
  • --timecheck<check seconds> Set the timer seconds for the time check.
  • --triggeredby<package file> Query the packager of the package.
  • --triggers Display the packaging scripts within the package file.
  • --verify The effect of this parameter is the same as specifying the "-q" parameter.
  • --version Display version information.
  • --whatprovides<feature> Query the compatibility provided by the package for the specified feature.
  • --whatrequires<feature> Query the compatibility required by the package for the specified feature.

Examples

Install software

# rpm -hvi dejagnu-1.4.2-10.noarch.rpm
warning: dejagnu-1.4.2-10.noarch.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing...                ########################################### [100%]

Display software installation information

# rpm -qi dejagnu-1.4.2-10.noarch.rpm

【First update: Tutorial, similar command association】

Image 2: Linux Command Manual Linux Command Manual

← File CloseFile Close β†’