45

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.

1
  • 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. – Ray Foss Dec 19 '17 at 14:42
41

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.

3
  • 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 – Dr.jacky Dec 19 '15 at 6:48
  • 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. – Hedley Finger Nov 6 '18 at 8:51
  • @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. – Jo-Erlend Schinstad Nov 7 '18 at 16:51
45

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
10

http://packages.ubuntu.com/natty/i386/banshee/filelist

or

dpkg -L banshee

3

If you do not find the command with whereis or which then maybe it is an alias. Try

alias

and check if the command is in the list.

1

Use the synaptic-package-manager:

synaptic Package Manager (GUI)

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'.

2
  • 4
    You should also say how to get the desired information! – guntbert May 5 '16 at 18:17
  • 1
    I appreciate the screen shot and think this answer is a useful addition. It shouldn't be down voted. – David Parks Jan 16 '17 at 21:58
1

The builtin Bash command, called command is also available:

 command [-pVv] command [arguments …]

Examples of usage:

$ command -v cat
/bin/cat
$ 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'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.