Ubuntu服务器系统环境也是我们常用的版本,但是有些时候我们在部署软件需要用到指定的版本。一般我们用哪些命令查看软件版本的呢?

1、apt-cache命令

这里,我们经常用apt-cache命令查看Ubuntu Linux软件包版本。

apt-cache madison {package}


如果我们有在安装Nginx且查看版本:

apt-cache madison nginx


2、aptitude命令检查软件包版本

aptitude versions {package-name-here}


如果我们需要查看安装在Ubuntu服务器上的htop版本。

aptitude versions htop


3、查看已安装软件包的版本

apt-show-versions {package-name-here}


比如我们需要查看vim编辑器版本

apt-show-versions vim