2

It has happened a few times that I installed a tool through apt or by downloading a package, but I cannot figure out what the command is to use the new software. For instance, I recently installed openmcdf. I tried the command openmcdf to run the newly installed software, but of course that was not the right command. The right command as it turns out was structuredstorageexplorer which I found after much searching on the internet. So is there a tool for displaying the commands that have been enabled by installing a package? Something like:

list-programs-from-package openmcdf
Tony Ruth
  • 137
  • You mean like https://packages.ubuntu.com/xenial/all/openmcdf/filelist? That's far from a good solution, but you could wget this: wget -qO- https://packages.ubuntu.com/xenial/all/openmcdf/filelist | sed '/\/usr\/bin/!d;s_[^/]*/_/_' – dessert Nov 15 '17 at 21:51

1 Answers1

3

You can run dpkg -L $package | grep "usr/bin" to see all the binaries or scripts that should appear in your $PATH to be executed by a normal user.

Some packages may install binaries in other locations which are not meant to be executed by normal users, though.

dobey
  • 40,982
  • You meant grep /usr/bin/, didn't you? Unfortunately this approach doesn't work for e.g. libreoffice or transmission. – dessert Nov 15 '17 at 22:03
  • Look at dpkg -L libreoffice - no executables in that package, but see dpkg -l libreoffice\* | grep -E '^ii'. I don't have transmission installed, but it's probably the same thing. – waltinator Nov 15 '17 at 22:14
  • Use dpkg -L $package | less and look at ALL the files installed by the package. Executables stored in /bin,/usr/bin,/usr/local/bin, or anywhere else , man pages, .desktop files, startup files in /etc/init or /etc/init.d, etc, etc. – waltinator Nov 15 '17 at 22:18
  • @dessert Sure it does. The problem with libreoffice is that it's many packages. Likewise, transmission has multiple packages, for different UI versions. It works if you know the package name, which is what the question was about. – dobey Nov 15 '17 at 23:32
  • @waltinator Debian packages shouldn't install to /usr/local/bin. If one does, it's broken. Likewise, anything in /bin/ should only be done in core system packages installed by default. The question also wasn't about man pages, desktop files, or system services registering with some service management service (SYSV, systemd, upstart, etc…). – dobey Nov 15 '17 at 23:34