Ubuntu Server 14.04 查看软件版本及其安装位置的常用 Shell 命令
01、查看软件详细信息
shell 命令:aptitude show pkgname
查看已 安装或未安装 软件的各种细节信息,包括:安装状态、版本、优先级、从属、功能简介、功能描述、软件首页等。 - root:~# aptitude show nginx
- Package: nginx
- State: installed
- Automatically installed: no
- Version: 1.4.6-1ubuntu3.2
- Priority: optional
- Section: web
- Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
- Architecture: all
- Uncompressed Size: 95.2 k
- Depends: nginx-core (>= 1.4.6-1ubuntu3.2) | nginx-full (>= 1.4.6-1ubuntu3.2) | nginx-light (>= 1.4.6-1ubuntu3.2) | nginx-extras (>=
- 1.4.6-1ubuntu3.2) | nginx-naxsi (>= 1.4.6-1ubuntu3.2), nginx-core (< 1.4.6-1ubuntu3.2.1~) | nginx-full (<
- 1.4.6-1ubuntu3.2.1~) | nginx-light (< 1.4.6-1ubuntu3.2.1~) | nginx-extras (< 1.4.6-1ubuntu3.2.1~) | nginx-naxsi (<
- 1.4.6-1ubuntu3.2.1~)
- Provided by: nginx-core, nginx-extras, nginx-full, nginx-light, nginx-naxsi
- Description: small, powerful, scalable web/proxy server
- Nginx ("engine X") is a high-performance web and reverse proxy server created by Igor Sysoev. It can be used both as a standalone
- web server and as a proxy to reduce the load on back-end HTTP or mail servers.
-
- This is a dependency package to install either nginx-core (by default), nginx-full, nginx-light, nginx-extras, or nginx-naxsi.
- Homepage: http://nginx.net
- root:~#
复制代码
02、查看已安装软件版本信息
shell 命令:dpkg -l pkgname
查看 已安装 软件版本及简短功能描述 - root:~# dpkg -l nginx
- Desired=Unknown/Install/Remove/Purge/Hold
- | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
- |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
- ||/ Name Version Architecture Description
- +++-===========================-==================-==================-========================================
- ii nginx 1.4.6-1ubuntu3.2 all small, powerful, scalable web/proxy server
- root:~#
复制代码
03、查看已安装软件目录位置
shell 命令:dpkg -L pkgname
查看 已安装 软件所有文件目录具体位置信息 - root:~# dpkg -L nginx
- /.
- /usr
- /usr/share
- /usr/share/doc
- /usr/share/doc/nginx
- /usr/share/doc/nginx/copyright
- /usr/share/doc/nginx/changelog.Debian.gz
- /usr/share/doc/nginx/README.Debian
- /usr/share/doc/nginx/CHANGES.gz
- root:~#
复制代码
04、查看软件是否安装
shell 命令:dpkg -l | grep pkgname
查看软件是否 已安装
- root:~# dpkg -l | grep nginx
- ii nginx 1.4.6-1ubuntu3.2 all small, powerful, scalable web/proxy server
- ii nginx-common 1.4.6-1ubuntu3.2 all small, powerful, scalable web/proxy server - common files
- ii nginx-core 1.4.6-1ubuntu3.2 amd64 nginx web/proxy server (core version)
- root:~#
复制代码
版权声明:
本文为独家原创稿件,版权归 德云社区,未经许可不得转载;否则,将追究其法律责任。
|