Debin based Linux system(Ubuntu)包管理工具
apt-* 檢視,安裝,刪除,更新包。
1. apt-cache search: Search Repository Using Package Name
apt-cache search ^包名$
在Repo中查詢包名,以查詢Apache 2為例
$ apt-cache search ^apache2$
apache2 - Apache HTTP Server metapackage
2. apt-cache search: Search Repository Using Package Description
apt-cache search + 包描述, 有時不知道包的準備名字,可以通過包的描述資訊查詢。
$ apt-cache search "Apache HTTP Server"
apache2 - Apache HTTP Server metapackage
apache2-doc - Apache HTTP Server documentation
apache2-mpm-event - Apache HTTP Server - event driven model
apache2-mpm-prefork - Apache HTTP Server - traditional non-threaded model
apache2-mpm-worker - Apache HTTP Server - high speed threaded model
apache2.2-common - Apache HTTP Server common files
3. apt-file search: Search Repository Using a Filename from the Package
apt-file search + 包中的任意檔名, 有時只知道包裡的配置檔案或可能執行檔案,也可以通過這些資訊查詢包。
$ apt-file search apache2.conf
apache2.2-common: /etc/apache2/apache2.conf
apache2.2-common: /usr/share/doc/apache2.2-common/examples/apache2/apache2.conf.gz
4. apt-cache show: Basic Information About a Package
apt-cache show + 包, 顯示包的基本資訊。
$ apt-cache show apache2
Package: apache2
Priority: optional
Maintainer: Ubuntu Core Developers
Original-Maintainer: Debian Apache Maintainers
Version: 2.2.11-2ubuntu2.3
Depends: apache2-mpm-worker (>= 2.2.11-2ubuntu2.3)
| apache2-mpm-prefork (>= 2.2.11-2ubuntu2.3)
| apache2-mpm-event (>= 2.2.11-2ubuntu2.3)
Filename: pool/main/a/apache2/apache2_2.2.11-2ubuntu2.3_all.deb
Size: 46350
Description: Apache HTTP Server metapackage
The Apache Software Foundation's goal is to build a secure, efficient and
extensible HTTP server as standards-compliant open source software.
Homepage: http://httpd.apache.org/
5. apt-cache showpkg: Detailed Information About a Package
apt-cache showdpkg + 包,顯示包更加祥細的資訊。
$ apt-cache showpkg apache2
Package: apache2
Versions:
2.2.11-2ubuntu2.3 (/var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_jaunty-updates_main_binary-i386_Packages) (/var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_jaunty-security_main_binary-i386_Packages)
Description Language:
File: /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_jaunty-updates_main_binary-i386_Packages
MD5: d24f049cd70ccfc178dd8974e4b1ed01
Reverse Depends:
squirrelmail,apache2
squid3-cgi,apache2
phpmyadmin,apache2
mahara-apache2,apache2
ipplan,apache2
Dependencies:
2.2.11-2ubuntu2.3 - apache2-mpm-worker (18 2.2.11-2ubuntu2.3) apache2-mpm-prefork (18 2.2.11-2ubuntu2.3) apache2-mpm-event (2 2.2.11-2ubuntu2.3)
2.2.11-2ubuntu2 - apache2-mpm-worker (18 2.2.11-2ubuntu2) apache2-mpm-prefork (18 2.2.11-2ubuntu2) apache2-mpm-event (2 2.2.11-2ubuntu2)
Provides:
2.2.11-2ubuntu2.3 -
2.2.11-2ubuntu2 -
Reverse Provides:
apache2-mpm-itk 2.2.6-02-1build4.3
apache2-mpm-worker 2.2.11-2ubuntu2.3
apache2-mpm-prefork 2.2.11-2ubuntu2.3
apache2-mpm-prefork 2.2.11-2ubuntu2
apache2-mpm-event 2.2.11-2ubuntu2
6. apt-file list: List all the Files Located Inside a Package
apt-file list + 包, 顯示包內所有檔案。
$ apt-file list apache2 | more
apache2: /usr/share/bug/apache2/control
apache2: /usr/share/bug/apache2/script
apache2: /usr/share/doc/apache2/NEWS.Debian.gz
apache2: /usr/share/doc/apache2/README.Debian.gz
apache2: /usr/share/doc/apache2/changelog.Debian.gz
...
7.apt-cache depends: List all Dependent Packages
apt-cache depends + 包, 顯示包的所有依賴。在安裝包前需要檢查安裝包所有的依賴
$ apt-cache depends apache2
apache2
|Depends: apache2-mpm-worker
|Depends: apache2-mpm-prefork
Depends: apache2-mpm-event
8. dpkg -l: Is the Package Already Installed?
dpkg -l , 顯示系統中所有的安裝包
9. apt-get install: Install a Package
apt-get install + 包,安裝包。
10. apt-get remove: Delete a Package
apt-get remove/purge , 刪除包
apt-get remove will not delete the configuration files of the package
apt-get purge will delete the configuration files of the package
11. apt-get -u install: Upgrade a Specific Package
apt-get -u install + 包,更新安裝包。
12. apt-get -u upgrade: Upgrade all Packages
更新所有安裝包。
相關文章
- Design and implementation of database anomaly monitoring system based on AI algorithmDatabaseAIGo
- Node JS Install - Ubuntu systemJSUbuntu
- MySQL based on Linux by C (轉)MySqlLinux
- Heibei solids control Water Based Mud (WBM) Recovery SystemSolid
- Ejabberd Cluster Based on EC2 Ubuntu Instance & LoadBalancerUbuntu
- 06 Coloured Petri Net-based Traffic Collision Avoidance System encounter model for the analysis of
- A temporary profile is loaded after you log on to a Windows Vista-based systemWindows
- Ubuntu 的軟體管理工具Ubuntu
- Linux system VLinux
- 論文閱讀 | An Artificial Neural Network-based Stock Trading System
- Backup your Linux SystemLinux
- Sysstat 11.1.4/11.0.4 釋出,Linux 系統管理工具包Linux
- Ubuntu 搜尋安裝包Ubuntu
- Lerna --多包儲存管理工具
- ubuntu linuxUbuntuLinux
- Glide--Golang包版本管理工具IDEGolang
- MEMORY_TARGET not supported on this system for linuxLinux
- Linux程式管理工具Linux
- ubuntu linux配置UbuntuLinux
- Linux System Log Collection、Log Integration、Log Analysis System Building LearningLinuxUI
- Ubuntu linux 為啥要開始選擇ubuntu LINUXUbuntuLinux
- Ubuntu.24軟體包的清理Ubuntu
- 在Ubuntu上使用Jetty部署War包UbuntuJetty
- Ubuntu Linux:定製Ubuntu安裝CD(轉)UbuntuLinux
- Ubuntu14.04下Dipy包安裝Ubuntu
- ubuntu透過安裝包安裝MongodbUbuntuMongoDB
- Debian和Ubuntu系統的軟體包管理工具Ubuntu
- Linux中的System V訊號量Linux
- Linux桌面基礎:X Window System——XorgLinux
- Linux/Unix System Level Attack、Privilege Escalation(undone)Linux
- linux:ora-27054:nfs file system errorLinuxNFSError
- linux 系統效能管理工具Linux
- Debian/Ubuntu包安裝工具APT的使用UbuntuAPT
- 【Linux Ubuntu】華為雲ECS安裝桌面版UbuntuLinuxUbuntu
- Linux轉包命令Linux
- linux 部署jar包LinuxJAR
- Ubuntu安裝Python的包管理工具Pip以及環境配置UbuntuPython
- PostgreSQL Cost Based Vacuum探秘SQL