1

When I install a program via command line, where does it go?
And how do I get an icon on the desktop?

I managed (I think) to install a couple of programs but don't know where they are. One place I looked said /usr/local, but I can't find that either. Sorry if this is a stupid question.

zx485
  • 2,865

1 Answers1

6

When you install a software from the official APT repositories, in most cases,

  1. The binary executable goes to /usr/bin.
  2. The icon goes to some place in /usr/share/icons
  3. The desktop file (which creates menu launchers) goes to /usr/share/applications.
  4. Documentations may go to /usr/share/doc.
  5. Many proprietary apps save their binaries in /opt, and symlink that to /usr/bin

There are separate directories for manual pages. And depending on the complexity of the package, files may go to many other places.

For an installed package with the name pkgname, run the command dpkg -L pkgname to find out list of all files.

Here is an example.

$ dpkg -L foliate
/.
/usr
/usr/bin
/usr/bin/foliate
/usr/share
/usr/share/applications
/usr/share/applications/com.github.johnfactotum.Foliate.desktop
/usr/share/com.github.johnfactotum.Foliate
/usr/share/com.github.johnfactotum.Foliate/com.github.johnfactotum.Foliate.gresource
/usr/share/doc
/usr/share/doc/foliate
/usr/share/doc/foliate/changelog.Debian.gz
/usr/share/doc/foliate/copyright
/usr/share/glib-2.0
/usr/share/glib-2.0/schemas
/usr/share/glib-2.0/schemas/com.github.johnfactotum.Foliate.gschema.xml
/usr/share/icons
/usr/share/icons/hicolor
/usr/share/icons/hicolor/scalable
/usr/share/icons/hicolor/scalable/apps
/usr/share/icons/hicolor/scalable/apps/com.github.johnfactotum.Foliate.svg
/usr/share/icons/hicolor/symbolic
/usr/share/icons/hicolor/symbolic/apps
/usr/share/icons/hicolor/symbolic/apps/com.github.johnfactotum.Foliate-symbolic.svg
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/foliate
/usr/share/locale
/usr/share/locale/ar
/usr/share/locale/ar/LC_MESSAGES
/usr/share/locale/ar/LC_MESSAGES/com.github.johnfactotum.Foliate.mo
/usr/share/locale/cs
/usr/share/locale/cs/LC_MESSAGES
/usr/share/locale/cs/LC_MESSAGES/com.github.johnfactotum.Foliate.mo
/usr/share/locale/de
/usr/share/locale/de/LC_MESSAGES
/usr/share/locale/de/LC_MESSAGES/com.github.johnfactotum.Foliate.mo
/usr/share/locale/el
/usr/share/locale/el/LC_MESSAGES
/usr/share/locale/el/LC_MESSAGES/com.github.johnfactotum.Foliate.mo
/usr/share/locale/es
/usr/share/locale/es/LC_MESSAGES
/usr/share/locale/es/LC_MESSAGES/com.github.johnfactotum.Foliate.mo
/usr/share/locale/eu
/usr/share/locale/eu/LC_MESSAGES
/usr/share/locale/eu/LC_MESSAGES/com.github.johnfactotum.Foliate.mo
/usr/share/locale/fa_IR
/usr/share/locale/fa_IR/LC_MESSAGES
/usr/share/locale/fa_IR/LC_MESSAGES/com.github.johnfactotum.Foliate.mo
/usr/share/locale/fr
/usr/share/locale/fr/LC_MESSAGES
/usr/share/locale/fr/LC_MESSAGES/com.github.johnfactotum.Foliate.mo
/usr/share/locale/he
/usr/share/locale/he/LC_MESSAGES
/usr/share/locale/he/LC_MESSAGES/com.github.johnfactotum.Foliate.mo
/usr/share/locale/hi
/usr/share/locale/hi/LC_MESSAGES
/usr/share/locale/hi/LC_MESSAGES/com.github.johnfactotum.Foliate.mo
/usr/share/locale/hr
/usr/share/locale/hr/LC_MESSAGES
/usr/share/locale/hr/LC_MESSAGES/com.github.johnfactotum.Foliate.mo
/usr/share/locale/id
/usr/share/locale/id/LC_MESSAGES
/usr/share/locale/id/LC_MESSAGES/com.github.johnfactotum.Foliate.mo
/usr/share/locale/ie
/usr/share/locale/ie/LC_MESSAGES
/usr/share/locale/ie/LC_MESSAGES/com.github.johnfactotum.Foliate.mo
/usr/share/locale/it
/usr/share/locale/it/LC_MESSAGES
/usr/share/locale/it/LC_MESSAGES/com.github.johnfactotum.Foliate.mo
/usr/share/locale/ko
/usr/share/locale/ko/LC_MESSAGES
/usr/share/locale/ko/LC_MESSAGES/com.github.johnfactotum.Foliate.mo
/usr/share/locale/nb
/usr/share/locale/nb/LC_MESSAGES
/usr/share/locale/nb/LC_MESSAGES/com.github.johnfactotum.Foliate.mo
/usr/share/locale/nl
/usr/share/locale/nl/LC_MESSAGES
/usr/share/locale/nl/LC_MESSAGES/com.github.johnfactotum.Foliate.mo
/usr/share/locale/nn
/usr/share/locale/nn/LC_MESSAGES
/usr/share/locale/nn/LC_MESSAGES/com.github.johnfactotum.Foliate.mo
/usr/share/locale/oc
/usr/share/locale/oc/LC_MESSAGES
/usr/share/locale/oc/LC_MESSAGES/com.github.johnfactotum.Foliate.mo
/usr/share/locale/pt_BR
/usr/share/locale/pt_BR/LC_MESSAGES
/usr/share/locale/pt_BR/LC_MESSAGES/com.github.johnfactotum.Foliate.mo
/usr/share/locale/ru
/usr/share/locale/ru/LC_MESSAGES
/usr/share/locale/ru/LC_MESSAGES/com.github.johnfactotum.Foliate.mo
/usr/share/locale/sv
/usr/share/locale/sv/LC_MESSAGES
/usr/share/locale/sv/LC_MESSAGES/com.github.johnfactotum.Foliate.mo
/usr/share/locale/tr
/usr/share/locale/tr/LC_MESSAGES
/usr/share/locale/tr/LC_MESSAGES/com.github.johnfactotum.Foliate.mo
/usr/share/locale/uk
/usr/share/locale/uk/LC_MESSAGES
/usr/share/locale/uk/LC_MESSAGES/com.github.johnfactotum.Foliate.mo
/usr/share/locale/zh_CN
/usr/share/locale/zh_CN/LC_MESSAGES
/usr/share/locale/zh_CN/LC_MESSAGES/com.github.johnfactotum.Foliate.mo
/usr/share/locale/zh_TW
/usr/share/locale/zh_TW/LC_MESSAGES
/usr/share/locale/zh_TW/LC_MESSAGES/com.github.johnfactotum.Foliate.mo
/usr/share/metainfo
/usr/share/metainfo/com.github.johnfactotum.Foliate.metainfo.xml

And how do I get an icon on the desktop?

Copy the .desktop file from /usr/share/applications to your Desktop directory in the home folder.