AndreaNobili Asked: 2015-07-03 05:43:39 +0800 CST2015-07-03 05:43:39 +0800 CST 2015-07-03 05:43:39 +0800 CST 我如何才能发现 apt-get 在哪里安装了应用程序? 772 我已经安装了 2 个名为maven并ant使用此命令的开发工具: sudo apt-get install maven ant 我如何才能发现这些工具在我的系统上的安装目录是什么? apt 2 个回答 Voted Best Answer A.B. 2015-07-03T05:57:37+08:002015-07-03T05:57:37+08:00 通过dpkg-query: dpkg-query -L maven dpkg-query -L ant 或使用过滤器grep dpkg-query -L maven | grep '^/usr/bin' 示例输出 $ dpkg-query -L mc /. /usr /usr/share /usr/share/applications /usr/share/applications/mc.desktop /usr/share/doc /usr/share/doc/mc /usr/share/doc/mc/README.Debian /usr/share/doc/mc/NEWS.Debian.gz /usr/share/doc/mc/changelog.Debian.gz /usr/share/doc/mc/copyright /usr/share/pixmaps /usr/share/pixmaps/mc.xpm /usr/share/menu /usr/share/menu/mc /usr/share/mc /usr/share/mc/bin /usr/share/lintian /usr/share/lintian/overrides /usr/share/lintian/overrides/mc /usr/bin /usr/bin/mc /usr/lib /usr/lib/mc /usr/lib/mc/extfs.d /usr/lib/mc/extfs.d/patchfs /usr/lib/mc/extfs.d/lslR /usr/lib/mc/extfs.d/debd /usr/lib/mc/extfs.d/mailfs /usr/lib/mc/extfs.d/ulha /usr/lib/mc/extfs.d/hp48+ /usr/lib/mc/extfs.d/ualz /usr/lib/mc/extfs.d/a+ /usr/lib/mc/extfs.d/uc1541 /usr/lib/mc/extfs.d/changesetfs /usr/lib/mc/extfs.d/bpp /usr/lib/mc/extfs.d/ucab /usr/lib/mc/extfs.d/audio /usr/lib/mc/extfs.d/uha /usr/lib/mc/extfs.d/deb /usr/lib/mc/extfs.d/urar /usr/lib/mc/extfs.d/uarc /usr/lib/mc/extfs.d/uzip /usr/lib/mc/extfs.d/dpkg+ /usr/lib/mc/extfs.d/ulib /usr/lib/mc/extfs.d/uar /usr/lib/mc/extfs.d/uzoo /usr/lib/mc/extfs.d/README /usr/lib/mc/extfs.d/apt+ /usr/lib/mc/extfs.d/iso9660 /usr/lib/mc/extfs.d/rpms+ /usr/lib/mc/extfs.d/deba /usr/lib/mc/extfs.d/rpm /usr/lib/mc/extfs.d/gitfs+ /usr/lib/mc/extfs.d/patchsetfs /usr/lib/mc/extfs.d/uarj /usr/lib/mc/extfs.d/u7z /usr/lib/mc/extfs.d/s3+ /usr/lib/mc/extfs.d/README.extfs /usr/lib/mc/extfs.d/uace /usr/lib/mc/extfs.d/trpm /usr/lib/mc/cons.saver /usr/lib/mc/mc.sh /usr/lib/mc/mc-wrapper.sh /usr/lib/mc/mc.csh /usr/lib/mc/ext.d /usr/lib/mc/ext.d/text.sh /usr/lib/mc/ext.d/video.sh /usr/lib/mc/ext.d/image.sh /usr/lib/mc/ext.d/archive.sh /usr/lib/mc/ext.d/package.sh /usr/lib/mc/ext.d/sound.sh /usr/lib/mc/ext.d/web.sh /usr/lib/mc/ext.d/misc.sh /usr/lib/mc/ext.d/doc.sh /usr/lib/mc/mc-wrapper.csh /usr/lib/mc/fish /usr/lib/mc/fish/ls /usr/lib/mc/fish/hardlink /usr/lib/mc/fish/unlink /usr/lib/mc/fish/mkdir /usr/lib/mc/fish/append /usr/lib/mc/fish/README.fish /usr/lib/mc/fish/send /usr/lib/mc/fish/fexists /usr/lib/mc/fish/ln /usr/lib/mc/fish/rmdir /usr/lib/mc/fish/utime /usr/lib/mc/fish/get /usr/lib/mc/fish/chmod /usr/lib/mc/fish/mv /usr/lib/mc/fish/chown /usr/lib/mc/fish/info /etc /etc/mc /etc/mc/mc.emacs.keymap /etc/mc/sfs.ini /etc/mc/mc.default.keymap /etc/mc/mc.keymap /etc/mc/filehighlight.ini /etc/mc/edit.indent.rc /etc/mc/mcedit.menu /etc/mc/mc.menu /etc/mc/mc.ext /etc/mc/mc.menu.sr /usr/share/mc/bin/mc.sh /usr/share/mc/bin/mc-wrapper.sh /usr/share/mc/bin/mc.csh /usr/share/mc/bin/mc-wrapper.csh /usr/bin/mcdiff /usr/bin/mcedit /usr/bin/mcview Maythux 2015-07-03T21:33:17+08:002015-07-03T21:33:17+08:00 除了AB答案,另一种解决方案: dpkg -L package-name 或者长格式: dpkg --list-files package-name man dpkg -L, --listfiles package-name... List files installed to your system from package-name. 所以在你的情况下运行: dpkg -L maven 和 dpkg -L ant
通过
dpkg-query
:或使用过滤器
grep
示例输出
除了AB答案,另一种解决方案:
或者长格式:
man dpkg
所以在你的情况下运行:
和