Ubuntu
1.apt list --installed
如:
root@ubuntu:~# apt list --installed | grep docker
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
docker/bionic,now 1.5-1build1 amd64 [已安装]
docker-compose/bionic,bionic,now 1.17.1-2 all [已安装]
docker.io/bionic-security,bionic-updates,now 18.09.7-0ubuntu1~18.04.4 amd64 [已安装]
golang-docker-credential-helpers/bionic,now 0.5.0-2 amd64 [已安装,自动]
python-docker/bionic,bionic,now 2.5.1-1 all [已安装,自动]
python-dockerpty/bionic,bionic,now 0.4.1-1 all [已安装,自动]
python-dockerpycreds/bionic,bionic,now 0.2.1-1 all [已安装,自动]
python3-docker/bionic,bionic,now 2.5.1-1 all [已安装,自动]
python3-dockerpycreds/bionic,bionic,now 0.2.1-1 all [已安装,自动]
root@ubuntu:~# apt list --installed docker
正在列表... 完成
docker/bionic,now 1.5-1build1 amd64 [已安装]
2.dpkg --get-selections
如:
root@ubuntu:~# dpkg --get-selections | grep docker
docker install
docker-compose install
docker.io install
golang-docker-credential-helpers install
python-docker install
python-dockerpty install
python-dockerpycreds install
python3-docker install
python3-dockerpycreds install
root@ubuntu:~# dpkg --get-selections docker
docker install
3.dpkg -l
root@ubuntu:~# dpkg -l | grep docker
ii docker 1.5-1build1 amd64 System tray for KDE3/GNOME2 docklet applications
ii docker-compose 1.17.1-2 all Punctual, lightweight development environments using Docker
ii docker.io 18.09.7-0ubuntu1~18.04.4 amd64 Linux container runtime
ii golang-docker-credential-helpers 0.5.0-2 amd64 Use native stores to safeguard Docker credentials
ii python-docker 2.5.1-1 all Python wrapper to access docker.io's control socket
ii python-dockerpty 0.4.1-1 all Pseudo-tty handler for docker Python client (Python 2.x)
ii python-dockerpycreds 0.2.1-1 all Python bindings for the docker credentials store API
ii python3-docker 2.5.1-1 all Python 3 wrapper to access docker.io's control socket
ii python3-dockerpycreds 0.2.1-1 all Python3 bindings for the docker credentials store API
root@ubuntu:~# dpkg -l docker
期望状态=未知(u)/安装(i)/删除(r)/清除(p)/保持(h)
| 状态=未安装(n)/已安装(i)/仅存配置(c)/仅解压缩(U)/配置失败(F)/不完全安装(H)/触发器等待(W)/触发器未决(T)
|/ 错误?=(无)/须重装(R) (状态,错误:大写=故障)
||/ 名称 版本 体系结构 描述
+++-=========================================================-=================================-=================================-=======================================================================================================================
ii docker 1.5-1build1 amd64 System tray for KDE3/GNOME2 docklet applications
注意:以上命令无需
sudo
权限
Centos
1.yum list installed 列出所有已安装的软件包信息
如:
[root@centos ~]# yum list installed | grep docker
docker.x86_64 2:1.13.1-103.git7f2769b.el7.centos @extras
docker-client.x86_64 2:1.13.1-103.git7f2769b.el7.centos @extras
docker-common.x86_64 2:1.13.1-103.git7f2769b.el7.centos @extras
[root@centos ~]# yum list installed docker
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* epel: mirrors.yun-idc.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
已安装的软件包
docker.x86_64
2.yum info installed 列出所有已安装的软件包信息
如:
3.yum list <package_name> 列出所指定的软件包
如:
[root@centos ~]# yum list | grep docker
docker.x86_64 2:1.13.1-103.git7f2769b.el7.centos
docker-client.x86_64 2:1.13.1-103.git7f2769b.el7.centos
docker-common.x86_64 2:1.13.1-103.git7f2769b.el7.centos
cockpit-docker.x86_64 195.1-1.el7.centos.0.1 extras
containerd.io.x86_64 1.2.6-3.3.el7 docker-ce-stable
docker-ce.x86_64 3:19.03.2-3.el7 docker-ce-stable
docker-ce-cli.x86_64 1:19.03.2-3.el7 docker-ce-stable
docker-ce-selinux.noarch 17.03.3.ce-1.el7 docker-ce-stable
docker-client-latest.x86_64 1.13.1-58.git87f2fab.el7.centos extras
docker-compose.noarch 1.18.0-4.el7 epel
docker-distribution.x86_64 2.6.2-2.git48294d9.el7 extras
docker-latest.x86_64 1.13.1-58.git87f2fab.el7.centos extras
docker-latest-logrotate.x86_64 1.13.1-58.git87f2fab.el7.centos extras
docker-latest-v1.10-migrator.x86_64 1.13.1-58.git87f2fab.el7.centos extras
docker-logrotate.x86_64 2:1.13.1-103.git7f2769b.el7.centos
docker-lvm-plugin.x86_64 2:1.13.1-103.git7f2769b.el7.centos
docker-novolume-plugin.x86_64 2:1.13.1-103.git7f2769b.el7.centos
docker-registry.x86_64 0.9.1-7.el7 extras
docker-v1.10-migrator.x86_64 2:1.13.1-103.git7f2769b.el7.centos
golang-github-fsouza-go-dockerclient-devel.x86_64
kdocker.x86_64 4.9-1.el7 epel
pcp-pmda-docker.x86_64 4.3.2-2.el7 base
podman-docker.noarch 1.4.4-4.el7.centos extras
python-docker-py.noarch 1:1.10.6-9.el7_6 extras
python-docker-pycreds.noarch 1:0.3.0-9.el7_6 extras
python-docker-scripts.noarch 0.4.4-1.el7 epel
python-dockerfile-parse.noarch 0.0.5-1.el7 epel
python2-avocado-plugins-runner-docker.noarch
python2-docker-squash.noarch 1.0.7-3.el7 epel
python2-dockerpty.noarch 0.4.1-10.el7 epel
python36-docker.noarch 2.6.1-3.el7 epel
python36-docker-pycreds.noarch 0.2.1-2.el7 epel
python36-dockerpty.noarch 0.4.1-10.el7 epel
[root@virtual-machine ~]# yum list docker
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* epel: mirrors.yun-idc.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
已安装的软件包
docker.x86_64
4.rpm -qa 查看已安装的组件
[root@centos ~]# rpm -qa|grep docker
docker-ce-18.09.0-3.el7.x86_64
docker-ce-cli-18.09.0-3.el7.x86_64
欢迎来到这里!
我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。
注册 关于