Where can I find the location of folders for installed programs?
I’m new to Ubuntu and would like to know where I can find the location of program files for programs installed from the Ubuntu Software Center or the Terminal.
If you prefer/use RPM on Ubuntu, you can also use rpm –ql [package] to get a list. This method also happens to work on most Fedora and RHEL distros.
8 Answers 8
Also, if you just need to know where the executable is you can run whereis executable or which executable For instance:
$ whereis firefox firefox: /usr/bin/firefox /etc/firefox /usr/lib/firefox /usr/share/man/man1/firefox.1.gz $ which firefox /usr/bin/firefox
on the command line, you can use dpkg —listfiles packagename . For instance, dpkg —listfiles firefox . If you want to see what files a package contains without installing it, then you can install apt-file and use that.
But you really shouldn’t mess with it. There is usually no reason to manually interfere with the contents of a package. All configuration files for normal applications are placed in the users home directory. You don’t have savegames in C:\Programfiles\Appname\savegames , for instance. They would be placed in /home/username/.local/share/appname/savegames . That way, if you move your home directory to another machine, it keeps all configurations and user data.
This command says «package ‘sdl’ is not installed»; But this command: «dpkg —get-selections | grep sdl» returned : libsdl-image1.2:amd64 install —- libsdl1.2debian:amd64 install —- libsdl2-2.0-0:amd64 install —- libsdl2-dev install
The OP wants to know where the installation directory containing the app files is located. He did not ask for a list of files in a package.
@HedleyFinger: There is no such thing as the «installation directory». Each app has files stored in many different directories for different types of files. /etc for default configs, /usr/bin for binaries, /usr/lib for libraries, etc. The command I showed, shows where all app files are installed.
If you do not find the command with whereis or which then maybe it is an alias. Try
and check if the command is in the list.
Use the synaptic-package-manager :
Assuming that we’d like to locate the files of the autotools-dev package, under ‘Quick filter’ enter autotools to locate it. The autotools-dev package appears automatically. Select it by clicking on it and then press ‘Properties’. In the appearing dialog select the tab ‘Installed Files’.
The builtin Bash command, called command is also available:
command [-pVv] command [arguments …]
$ command -V cat cat is /bin/cat
When the searched command is an alias:
$ command -v ll alias ll='ls -alF'
$ command -V ll ll is aliased to `ls -alF'
Coming to Linux from Windows, there are some different terminology, which sometimes seems strange.
The first one is the word package that we find on Linux. We install packages on Linux, which may sound different but makes total sense:
- When installing something on the computer, we are installing programs like in your question, but also configuration files, images, documentation, etc. Sometimes we are even installing, in one package, many programs
One example for you, i was looking for installing a package called bluez-tools in Lubuntu 22.04. In your terminal:
sudo apt install bluez-tools
After installing it, the question is, how to use this bluez-tools stuff i have installed. Then we have the answer to your question, we have to look for what and where we have just installed the package in our system.
The following command gives you some information about the package you just installed.
dpkg -l bluez-tools ii bluez-tools 2.0~20170911.0.7cb788c-4 amd64 Set of tools to manage Bluetooth devices for linux
And this other command shows what and where things were installed
dpkg -l bluez-tools /. /usr/bin /usr/bin/bt-adapter /usr/bin/bt-agent /usr/bin/bt-device /usr/bin/bt-network /usr/bin/bt-obex /usr/share /usr/share/doc /usr/share/doc/bluez-tools /usr/share/doc/bluez-tools/README /usr/share/doc/bluez-tools/changelog.Debian.gz /usr/share/doc/bluez-tools/copyright /usr/share/man /usr/share/man/man1 /usr/share/man/man1/bt-adapter.1.gz /usr/share/man/man1/bt-agent.1.gz /usr/share/man/man1/bt-device.1.gz /usr/share/man/man1/bt-network.1.gz /usr/share/man/man1/bt-obex.1.gz
It can be seen the package contains 5 programs, some docs, and five manual pages.
How can i find the location of installed software in linux?
Is there any command that I can use in the console to know the location of installed software in linux? i have copied a xyz.bin from windows machine to linuxdesktop and installed it. more over can you please tell me how to uninstall a software which is installed in linux Thanks in advance
You might be able to use the find command to search for it. Have a look at this unix.stackexchange.com/questions/19369/…
3 Answers 3
to find the path where the binary is linked to.
Other application specific files may reside in
The way a package is installed/uninstalled on Linux depends on either the specific Linux distribution AND the specific package.
Since you have used a .bin file for installation, it is likely that you have an uninstall command specific for your program in the path.
If you provide more information about the package and the Linux distribution, we can give more help.
It depends on the distribution you’re using. Supposing you are using a debian\ubuntu distribution, you can uninstall it by the apt command, using sudo apt-get remove software_name sudo apt-get purge software_name
Of course you need to have root privileges.
The softwares are usually installed in bin folders, in /usr/bin, /home/user/bin and many other places, a nice starting point could be the find command to find the executable name, but it’s usually not a single folder. The software could have components and dependencies in lib,bin and other folders.
How to locate a package installed by yum?
But how can I find the location of it? I know I can use find / -name php-imap for searching, but it is every long time, even the command do not have reactivity. In my CentOS 7, the /var/tmp/ is an empty directory. and list the /var/cache/yum/x86_64/7/ are:
base epel extras mysql56-community mysql-connectors-community mysql-tools-community timedhosts timedhosts.txt updates webtatic.
2 Answers 2
If you want to know where the rpm file is, depending on your yum config your system may or may not keep it. Check /etc/yum.conf (not sure this is the right location on ALL systems but on my Centos box this is the right place) for the line «cachedir mt24″>
rpm -ql
Given that your question is about the packages installed using yum , then You have to check the options info and list «sub-flags». According to Yum man:
info Display details about a package or group of packages list Is used to list various information about available packages; LIST OPTIONS The following are the ways which you can invoke yum in list mode. Note that all list commands include information on the version of the package. OUTPUT The format of the output of yum list is: name.arch [epoch:]version-release repo or @installed-from-repo Note that if the repo cannot be determined, "installed" is printed instead. yum list [all | glob_exp1] [glob_exp2] [. ] List all available and installed packages. yum list available [glob_exp1] [. ] List all packages in the yum repositories available to be installed. yum list updates [glob_exp1] [. ] List all packages with updates available in the yum repositories. yum list installed [glob_exp1] [. ] List the packages specified by args. If an argument does not match the name of an available package, it is assumed to be a shell-style glob and any matches are printed. yum list extras [glob_exp1] [. ] List the packages installed on the system that are not available in any yum repository listed in the config file. yum list distro-extras [glob_exp1] [. ] List the packages installed on the system that are not available, by name, in any yum repository listed in the config file. yum list obsoletes [glob_exp1] [. ] List the packages installed on the system that are obsoleted by packages in any yum repository listed in the config file. yum list recent List packages recently added into the repositories. This is often not helpful, but what you may really want to use is "yum list-updateinfo new" from the security yum plugin.
In Addition, the path to the installed packages depends on your system settings:
/var/cache/yum/x86_64/7/program_name/packages/
In RHEL, the files are stored in
How to find the installation path for a software under linux?
Under linux, I launch a software by typing, e.g., fluidplot. How can I find the installation path for this software?
9 Answers 9
to see where it is executing from (if it’s in your $PATH). Or:
find / -name fluidpoint 2> /dev/null
to look for a file named fluipoint and redirect errors on virtual filesystems.
Usually they are in /sbin , /usr/sbin , /usr/local/bin or ~ as a hidden directory.
NAME which - shows the full path of (shell) commands. SYNOPSIS which [options] [--] programname [. ]
@Michael excellent to know. Because of your comment, I just discovered that newer versions of bash also do this. +1 to your comment.
The «Usually they are . » line is pretty disingenuous, additional software should be in /opt/* or /usr/local/bin . ~ is your home directory, I’m confused why you call it «hidden».
Sorry to be ambiguous, I mean ~/.dir . The hidden directory is below the home directory. And I completely forgot about /usr/local/bin dop.
If you use an RPM based distribution (CentOS, RHEL, SUSE, openSUSE) you can use rpm -ql
rpm -ql findutils /bin/find /usr/bin/find /usr/bin/xargs /usr/share/doc/packages/findutils /usr/share/doc/packages/findutils/AUTHORS /usr/share/doc/packages/findutils/COPYING /usr/share/doc/packages/findutils/NEWS /usr/share/doc/packages/findutils/README /usr/share/doc/packages/findutils/THANKS /usr/share/doc/packages/findutils/TODO /usr/share/info/find.info.gz /usr/share/man/man1/find.1.gz
Things aren’t installed to locations in the Linux/UNIX world like they are in the Windows (and even somewhat in the Mac) world. They are more distributed. Binaries are in /bin or /sbin , libraries are in /lib , icons/graphics/docs are in /share, configuration is in /etc and program data is in /var .
The /bin , /lib , /sbin contain the core applications needed for booting and the /usr contains all the other user and system applications.
Just to add some point to @djsumdog’s answer, if you are using DPKG based dist, like Ubuntu, you can use
to check what it is about, and
dpkg --listfiles some_package
to check what files are included/relevant to this package. It’s for packages that don’t have a binary to run, like libnss3 . And
to find what package includes this file.
For example, dpkg —listfiles libnss3 gives me:
/. /usr /usr/lib /usr/lib/i386-linux-gnu /usr/lib/i386-linux-gnu/libssl3.so /usr/lib/i386-linux-gnu/nss /usr/lib/i386-linux-gnu/nss/libsoftokn3.chk /usr/lib/i386-linux-gnu/nss/libnssckbi.so /usr/lib/i386-linux-gnu/nss/libnsssysinit.so /usr/lib/i386-linux-gnu/nss/libfreebl3.chk /usr/lib/i386-linux-gnu/nss/libnssdbm3.chk /usr/lib/i386-linux-gnu/nss/libnssdbm3.so /usr/lib/i386-linux-gnu/nss/libsoftokn3.so /usr/lib/i386-linux-gnu/nss/libfreebl3.so /usr/lib/i386-linux-gnu/libnssutil3.so /usr/lib/i386-linux-gnu/libsmime3.so /usr/lib/i386-linux-gnu/libnss3.so /usr/share /usr/share/doc /usr/share/doc/libnss3 /usr/share/doc/libnss3/copyright /usr/share/doc/libnss3/changelog.Debian.gz /usr/share/lintian /usr/share/lintian/overrides /usr/share/lintian/overrides/libnss3
Note that the folders are not only owned by this packages, but by others too. Just check the files.
And reversely, dpkg —search libnss3.so gives me:
firefox: /usr/lib/firefox/libnss3.so thunderbird: /usr/lib/thunderbird/libnss3.so libnss3:i386: /usr/lib/i386-linux-gnu/libnss3.so libnss3-1d:i386: /usr/lib/i386-linux-gnu/libnss3.so.1d