http://rsljdkt.iteye.com/blog/1142463
Apt-cache Search Wubipinyin
The Apt-get command itself does not have the ability to manage packages, but provides a command-line platform for package management.
Use richer subcommands on this platform to accomplish specific management tasks.
The general syntax format for the Apt-get command is:
SH code
- Apt-get subcommands [-D |-f |-m |-Q |--purge |--reinstall |-B |-S |-y |-u |-H |-v] [PKG]
The Apt-cache provides search functionality.
Note: In the following command, the contents of the angle brackets are determined by the user, such as <pkg> can be replaced with the actual package name Mysql-server.
1. Update or upgrade operation:
SH code
- Apt-get Update # Updates source
- Apt-get Upgrade # Update all installed packages
- Apt-get Dist-upgrade # Release Upgrade (for example, from 10.10 to 11.04)
2. Install or reload the class operation:
SH code
- Apt-get Install <pkg> # installation package <pkg>, multiple packages separated by spaces
- Apt-get Install--reinstall <pkg> # Reinstall package <pkg>
- Apt-get install-f <pkg> # Repair installation (broken dependencies) package <pkg>
3. Uninstall the class operation:
SH code
- Apt-get Remove <pkg> # Remove package <pkg> (not including profile)
- Apt-get Purge <pkg> # Delete package <pkg> (including configuration file)
4. Download the Purge class operation:
SH code
- Apt-get source <pkg> # Download pkg package source code to current directory
- apt-get download <pkg> # download PKG Package binary package to current directory
- Apt-get source-d <pkg> # After downloading the source package, compile
- Apt-get BUILD-DEP <pkg> # Build a dependent environment for PKG source packages (compiled environment? )
- Apt-get Clean # Clears all downloaded packages in cache (/var/cache/apt/archives/{,partial})
- Apt-get AutoClean # is similar to clean, but clears the expired packages in the cache (that is, packages that cannot be downloaded or are useless)
- Apt-get Autoremove # Remove dependencies that are automatically installed due to installation software, and now do not require a dependency package
5. Query the class operation:
SH code
- Apt-cache Stats # Displays statistics for the system software package
- Apt-cache Search <pkg> # Searching for packages using the keyword pkg
- Apt-cache Show <pkg_name> # shows details of package Pkg_name
- Apt-cache depends <pkg> # see which packages the pkg depends on
- Apt-cache rdepends <pkg> # View Pkg is dependent on those packages
6. Description of the Software installation directory:
The generic Deb package (including new or apt-get downloads) is/usr/share.
You download the compressed package or compiled package, some can choose to install the directory, generally placed in the/usr/local/, also in the/opt.
7. About the Apt-get cache directory:
The default cache directory is/var/cache/apt/archives/
In order to install the software after reinstalling the system later or to save the download time or to use the package for others, you can compress the package in the directory to save space after compressing the backup.
Summary Ubuntu apt-get apt-cache Command use