Hello! I would like to know where I can find the program folder when I install a new program from the ubuntu software center. Thank you!
It depends on the application you installed. Usually there will be a few (I will refer to a fictional program called application) :
- application.desktop in /usr/share/applications - see this as a shortcut to the actual program
- application runtime in /usr/bin/ - this is the actual program
- application-data in /usr/share/application - this is where the data files are stored (like user interfaces etc.)
BUT, yes there is actually a but here
Applications like minecraft actually store there userdata in the users home directory and that could be ~/.config/application, ~/.local/config/application/ or ~/.application. Or a whole lot of other options are available. Some applications like to reside in /opt/ or any other directory possible.
Did I confuse you already?
One that always has to be there is the *.desktop file in /usr/share/applications, otherwise there wouldn’t be a menu entry, so what you can do is (and I use pluma as an example):
$ cat /usr/share/applications/pluma.desktop
Look for the line Exec=pluma %U - with a line like this you can safely assume that the executable resides in /usr/bin/:
$ls /usr/bin/pluma
/usr/bin/pluma
But if you do a search
find / -type f -name "pluma*"
You will see that there are a lot of directories used like /usr/share/themes and /usr/share/locale/, but the main folder for pluma is: /usr/share/pluma. That is where you will find the UI, plugins etc.
So, that was a long answer for a short one: it depends on the program
In addition, some programs may install to /opt
, like Google Chrome and Telegram.
It may look all over the place, but there is a standard and everything has it's place.
You can hunt down binaries with the which
command too:
which pluma
which google-chrome
Packages also tell you where they install their files, so they know exactly where they are placed when it comes to removing or upgrading the packages. If you wanted to take a look, find the archive in /var/cache/apt/archives
.
(Only newly downloaded packages appear here)
You can open it up using GDebi Package Installer, where the Included files tab lists what this application installs:
dpkg-query -L package_name
Using pluma again as an example:
user@myhost:~$ dpkg-query -L pluma
/.
/usr
/usr/bin
/usr/bin/pluma
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/pluma
/usr/lib/x86_64-linux-gnu/pluma/plugins
/usr/lib/x86_64-linux-gnu/pluma/plugins/libsort.so
/usr/lib/x86_64-linux-gnu/pluma/plugins/libmodelines.so
/usr/lib/x86_64-linux-gnu/pluma/plugins/libspell.so
/usr/lib/x86_64-linux-gnu/pluma/plugins/docinfo.pluma-plugin
/usr/lib/x86_64-linux-gnu/pluma/plugins/libdocinfo.so
/usr/lib/x86_64-linux-gnu/pluma/plugins/quickopen.pluma-plugin
/usr/lib/x86_64-linux-gnu/pluma/plugins/time.pluma-plugin
/usr/lib/x86_64-linux-gnu/pluma/plugins/externaltools
/usr/lib/x86_64-linux-gnu/pluma/plugins/externaltools/library.py
/usr/lib/x86_64-linux-gnu/pluma/plugins/externaltools/linkparsing.py
/usr/lib/x86_64-linux-gnu/pluma/plugins/externaltools/__init__.py
/usr/lib/x86_64-linux-gnu/pluma/plugins/externaltools/manager.py
/usr/lib/x86_64-linux-gnu/pluma/plugins/externaltools/capture.py
/usr/lib/x86_64-linux-gnu/pluma/plugins/externaltools/functions.py
/usr/lib/x86_64-linux-gnu/pluma/plugins/externaltools/outputpanel.py
/usr/lib/x86_64-linux-gnu/pluma/plugins/externaltools/filelookup.py
/usr/lib/x86_64-linux-gnu/pluma/plugins/pythonconsole
/usr/lib/x86_64-linux-gnu/pluma/plugins/pythonconsole/__init__.py
/usr/lib/x86_64-linux-gnu/pluma/plugins/pythonconsole/console.py
/usr/lib/x86_64-linux-gnu/pluma/plugins/pythonconsole/config.py
/usr/lib/x86_64-linux-gnu/pluma/plugins/libfilebrowser.so
/usr/lib/x86_64-linux-gnu/pluma/plugins/sort.pluma-plugin
/usr/lib/x86_64-linux-gnu/pluma/plugins/snippets.pluma-plugin
/usr/lib/x86_64-linux-gnu/pluma/plugins/filebrowser.pluma-plugin
/usr/lib/x86_64-linux-gnu/pluma/plugins/changecase.pluma-plugin
/usr/lib/x86_64-linux-gnu/pluma/plugins/snippets
/usr/lib/x86_64-linux-gnu/pluma/plugins/snippets/SubstitutionParser.py
/usr/lib/x86_64-linux-gnu/pluma/plugins/snippets/__init__.py
/usr/lib/x86_64-linux-gnu/pluma/plugins/snippets/LanguageManager.py
/usr/lib/x86_64-linux-gnu/pluma/plugins/snippets/Snippet.py
/usr/lib/x86_64-linux-gnu/pluma/plugins/snippets/Placeholder.py
/usr/lib/x86_64-linux-gnu/pluma/plugins/snippets/Importer.py
/usr/lib/x86_64-linux-gnu/pluma/plugins/snippets/Exporter.py
/usr/lib/x86_64-linux-gnu/pluma/plugins/snippets/Parser.py
/usr/lib/x86_64-linux-gnu/pluma/plugins/snippets/Completion.py
/usr/lib/x86_64-linux-gnu/pluma/plugins/snippets/Helper.py
/usr/lib/x86_64-linux-gnu/pluma/plugins/snippets/Library.py
/usr/lib/x86_64-linux-gnu/pluma/plugins/snippets/WindowHelper.py
/usr/lib/x86_64-linux-gnu/pluma/plugins/snippets/Document.py
/usr/lib/x86_64-linux-gnu/pluma/plugins/snippets/Manager.py
/usr/lib/x86_64-linux-gnu/pluma/plugins/quickopen
/usr/lib/x86_64-linux-gnu/pluma/plugins/quickopen/virtualdirs.py
/usr/lib/x86_64-linux-gnu/pluma/plugins/quickopen/__init__.py
/usr/lib/x86_64-linux-gnu/pluma/plugins/quickopen/windowhelper.py
/usr/lib/x86_64-linux-gnu/pluma/plugins/quickopen/popup.py
/usr/lib/x86_64-linux-gnu/pluma/plugins/externaltools.pluma-plugin
/usr/lib/x86_64-linux-gnu/pluma/plugins/libchangecase.so
/usr/lib/x86_64-linux-gnu/pluma/plugins/trailsave.pluma-plugin
/usr/lib/x86_64-linux-gnu/pluma/plugins/modelines.pluma-plugin
/usr/lib/x86_64-linux-gnu/pluma/plugins/spell.pluma-plugin
/usr/lib/x86_64-linux-gnu/pluma/plugins/pythonconsole.pluma-plugin
/usr/lib/x86_64-linux-gnu/pluma/plugins/libtaglist.so
/usr/lib/x86_64-linux-gnu/pluma/plugins/taglist.pluma-plugin
/usr/lib/x86_64-linux-gnu/pluma/plugins/libtime.so
/usr/lib/x86_64-linux-gnu/pluma/plugins/libtrailsave.so
/usr/lib/x86_64-linux-gnu/pluma/plugin-loaders
/usr/lib/x86_64-linux-gnu/pluma/plugin-loaders/libpythonloader.so
/usr/lib/x86_64-linux-gnu/pluma/plugin-loaders/libcloader.so
/usr/lib/pluma
/usr/lib/pluma/pluma-bugreport.sh
/usr/share
/usr/share/applications
/usr/share/applications/pluma.desktop
/usr/share/doc
/usr/share/doc/pluma
/usr/share/doc/pluma/copyright
/usr/share/doc/pluma/changelog.Debian.gz
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/pluma.1.gz
Nice one @Dave_Barnes, I didn’t know that one
See, you live and learn