Ubuntu查看软件安装位置及版本

查询版本

aptitude

1
2
sudo apt install aptitude
aptitude show 软件名

例如:

1
aptitude show electron-ssr

显示如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
Package: electron-ssr             
State: installed
Automatically installed: no
Version: 0.2.6-119
Priority: extra
Section: default
Maintainer: erguotou <erguotou525@gmail.com>
Architecture: amd64
Uncompressed Size: 131 M
Depends: gconf2, gconf-service, libnotify4, libappindicator1, libxtst6, libnss3, libxss1
Description: Cross platform ShadowsocksR GUI client built with electron
Cross platform ShadowsocksR GUI client built with electron
Homepage: https://github.com/erguotou520/electron-ssr/

dpkg -l

1
2
3
4
dpkg -l 软件名

例如:
dpkg -l electron-ssr

显示如下:

1
2
3
4
5
6
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 electron-ssr 0.2.6-119 amd64 Cross platform ShadowsocksR GUI client built with electron

查询安装路径

dpkg -L

1
2
3
4
dpkg -L 软件名

例如:
dpkg -L electron-ssr

显示结果(省略部分显示):

1
2
3
4
5
6
7
8
9
10
11
/.
/opt
/opt/electron-ssr
/opt/electron-ssr/electron-ssr
...
/usr
/usr/share
/usr/share/doc
...
/usr/share/applications
/usr/share/applications/electron-ssr.desktop

可以看到Dash中的快捷方式位于/usr/share/applications目录下

whereis

1
2
3
4
whereis 软件名

例如
whereis electron-ssr

显示结果:

1
electron-ssr: /usr/local/bin/electron-ssr

参考

ubuntu下如何查看软件安装目录以及安装版本

------ 本文结束------
坚持原创技术分享,您的支持将鼓励我继续创作!

欢迎关注我的其它发布渠道