Relationship between applications and system commands
File Location
System Command: generally in the/bin and/sbin directories, or for Shell internal commands
Applications: usually in the/usr/bin and/usr/sbin Directories
Main Purpose
System Command: complete basic management of the system, such as IP configuration tools
Application: complete other independent auxiliary tasks, such as web browsers.
Applicable Environment
System Command: Generally, it is only run on the Character operation interface.
Application: based on actual needs, some programs can be run in the graphic interface.
Running format
System commands: generally include command words, command options, and command parameters.
Application: there is usually no fixed execution format
Directory structure of typical applications
File Type |
Save directory |
Common execution program file |
/Usr/bin |
Server execution program files and Management Program Files |
/Usr/sbin |
Application configuration file |
/Etc |
Log Files |
/Var/log |
Application documentation |
/Usr/share/doc |
Application manual page file |
/Usr/share/man |
Common package encapsulation types
Encapsulation type |
Description |
Rpm Software Package |
The extension is ". rpm" |
Deb Software Package |
The extension is ". deb" |
Source code package |
It is a compressed package in the format of ".tar.gz?##.tar.bz2 ". Contains the original code of the program |
Software Package with Installer |
Install. sh, setup, and other installation programs are provided in the compressed package. Or a single execution file in ". bin" format provides |
Green installation-Free Software Package |
Provide compiled execution program files in the compressed package You can use the file after unzipping the package. |
RPM Package Manager
Proposed by Red Hat and adopted by many Linux distributions
Establishes a unified database file, records changes such as installation and uninstallation of software packages in detail, and automatically analyzes Software Package dependencies.
General naming format:
Bash-3.1-16.1.i386.rpm
Software name version number of releases hardware platform Extension
RPM package management command-rpm
Main functions
1. query RPM software and package file information
2. Install, upgrade, and uninstall the RPM Software Package
3. Maintain RPM database information
Query the RPM software information that has been installed
Format: rpm-q [sub-options] [software name]
Usage: use different sub-options to complete different queries
-Qa: view the list of all RPM software packages installed in the system (the number of installed rpm software is displayed in conjunction with the RPM-qa | wc-l pipeline)
-Qi: view the details of the specified software.
-Ql: queries the Directory and file list installed by the specified software package.
-Qc: only the configuration files installed by the specified software package are displayed.
-Qd: only the document files installed by the specified software package are displayed.
-Qf: check which software package is installed in the specified file or directory.
For example, you can query which RPM software a file or directory belongs.
Format: rpm-qf file or directory name
Query uninstalled RPM package files
Format: rpm-qp [sub-options] RPM package file
Usage: use different sub-options to complete different queries
-Qpi: view the software details in the. rpm package file.
-Qpl: view the Directory and file list contained in the. rpm installation package.
-Qpc: view the list of configuration files contained in the. rpm installation package.
-Qpd: view the file list contained in the. rpm installation package.
Install or upgrade RPM Software
Format: rpm [Option] RPM package file...
Usage: different options apply to different situations
-I: install a new rpm package.
-U: upgrade an rpm software. If it is not installed, install it.
-F: update an rpm software. If it is not installed, discard the installation.
For example, uninstall the specified RPM software.
Format: rpm-e Software name
Auxiliary options
-- Force: forces the installation of the specified rpm package
-- Nodeps: The dependency is ignored when the software is installed, upgraded, or uninstalled.
-H: "#" indicates the installation progress.
-V: displays detailed information during installation.
-- Rebuilddb or -- initdb: rebuilding the RPM Database
-- Imoort: Import Verification Public Key
Resolve Software Package Dependencies
When installing multiple dependent Software
The dependent software package must be installed first.
Multiple. rpm package files are specified for installation at the same time
When multiple software with dependency is uninstalled
Software packages dependent on other programs must be uninstalled first.
Multiple Software names are specified for detaching at the same time.
Ignore dependency
Combined with the "-- nodeps" option, but may cause software exceptions
This article is from the "steven, blog" blog, please be sure to keep this source http://stevensj.blog.51cto.com/8011491/1305358