I am using Ubuntu 12.04 and am unable to find where I install software using apt-get. In the dash if I type eclipse or the name of the software it appears, But I am unable to right click on it and open the folder location. Does anyone know how to find where exactly a particular software is installed using the dash. Also is it possible to set a software to be installed to a particular location when using the apt-get.
Summary
which filename
or by searching in Nautilus.Details
You cannot change the default locations to install software with
apt-get
, the Software Center, or the other package management tools in Ubuntu. You can manually retrieve packages and extract their files wherever you want, but you almost certainly wouldn't want to do that. Generally speaking, it's a hassle and there's typically no reason to do it.Packages install files throughout the filesystem, mostly in different subdirectories of
/usr
. This is in accordance with the filesystem hierarchy standard which specifies where different kinds of files, associated with installed programs and libraries, are supposed to go in a GNU/Linux system (i.e., in a "Linux distribution," like Ubuntu)./usr/bin
. That's where theeclipse
executable is installed when you install theeclipse
package on Ubuntu./usr/games
instead./usr/sbin
instead. (s
stands for "system". These are "system binaries.")/usr/lib
./usr/lib32
./usr/include
. These files are provided by packages whose names end in-dev
. The exception is the headers for building kernel modules--those go in/usr/src
./usr/src
. Header files for building kernel modules also go here./usr/share
. Please note that this is for data files that remain unchanged except when the package itself is updated, not documents you create. For example, the master lists for spellchecker dicationaries (but not user-specific additions to them) will usually go in/usr/share
./etc
.You'll notice I keep saying "usually." This is because:
/usr
. They go in the corresponding subdirectories of/
itself. For example, core files that provide basic system utilities go in/sbin
. Core system files that provide basic "user" utilities, like the shells provided by default with the system, go in/bin
. Core libraries go in/lib
. And so forth./opt
. The main purpose of/opt
is to store (1) programs that choose not to spread their files around to the ordinary places in the filesystem heirarchy, but instead all in a single directory (whether or not these programs are installed using the package manager), and (2) programs installed by binary installers, not through the package manager, and don't have a package associated with them. (Programs installed for systemwide use by being built manually by the user from source code are ordinarily installed in the directories inside/usr/local
.)There are a few ways to search for executables and other files provided by Ubuntu packages.
I don't know of a way to use the Unity Dash to tell you the location of a program in an accessible way. But you can accomplish this graphically with Nautilus, the graphical file browser.
eclipse
) and press Enter./usr
) and click Reload.This is how you search for files on your system in general (i.e., not just those provided by Ubuntu packages), with the ability to get detailed information about them.
Using the Terminal (Ctrl+Alt+T), you can find executables like eclipse with
which
:which
tells you which executable (if any) would be run if you typed eclipse and pressed enter in the Terminal. This is quite often, but not always, the same as the first search result when you search for the same thing in the Unity dash.Using the Terminal, you can find files quickly with
locate
(as the database that keeps the list is updated periodically). This is especially good when you want to find a file that is provided by a package, but is not actually an executable.You can search through the files provided in Ubuntu packages at packages.ubuntu.com. There are other ways too.
I fear it is not possible to do that from the dash. If you want to know where the executable path is, you can use the which command:
But this will probably point to some "bin" directory, and not to the directory containing the data. That's because software components are not installed in a single directory, but across many folders. Binaries stay in /usr/bin/, /bin, /sbin, etc depending on their use. Configuration in /etc, data in /usr/share, etcetera. Refer to this document about Filesystem Hierarchy Standard and the reason while you usually don't have a single-folder installation. As apt follows FHS, as far as I know it is not possible to force it to install in different location.
So about where is eclipse installed, it depends on which part of eclipse you are searching for. A common need is to install plugins, which are stored under: /usr/lib/eclipse/plugins. I usually prefer the integrated plugin manager, anyway.