I am very new to Linux (Ubuntu 13.10) and having difficulty understanding the file system, particularly with regards to installing applications. In Windows, when I installed an application, it put the contents of the application in a folder in Program Files, by default. I knew exactly where to look if I wanted to browse all my applications, for example to see if I had already installed something. However, I have found that with Linux, there is much less consistency.

For example, when I installed the Komodo code editor, by default it created a folder in /home. Then, when I installed the TexLive Latex editor, by default it created a folder in /usr/local. From searching around, I have found that most applications are supposed to be installed in /bin or /usr/bin. Why are there so many different default places to install applications? Why not the consistency found in Windows?

On a slightly different note, if I were to move my Komodo folder from /home to /bin, for example, will doing a simple cut and paste be acceptable, or will there be references to the original folder in /home that will now be invalid? I have already added the Komodo bin folder to $PATH, so I already know about that one, but are there any other such references?

  • As with any system, consistency is a result of peope/programs following some existent rule. Install python on a windows system and it will end up in C:` and not in C:\Program Files` (or some other installation language dependent directory) – Timo Mar 2 '14 at 13:50

It does actually tend to be consistent. The standard is the FHS specification and while it is admittedly not always followed it mostly is:

  • /bin : Essential user command binaries (for use by all users)
  • /boot : Static files of the boot loader
  • /dev : Device files
  • /etc : Host-specific system configuration
  • /home : User home directories (optional)
  • /lib : Essential shared libraries and kernel modules
  • /media : Mount point for removeable media
  • /mnt : Mount point for a temporarily mounted filesystem
  • /opt : Add-on application software packages
  • /root : Home directory for the root user (optional)
  • /sbin : System binaries
  • /srv : Data for services provided by this system
  • /tmp : Temporary files

Then, you also have

  • /usr/local : The /usr/local hierarchy is for use by the system administrator when installing software locally. It needs to be safe from being overwritten when the system software is updated. It may be used for programs and data that are shareable amongst a group of hosts, but not found in /usr.

The approach is just different is all. While Windows stores files by source (all files installed by a program are placed in the same folder), *nix systems install by type. So, the manual page will be in /usr/man or /usr/local/man, the executables (.exe in Windows) in /usr/bin or /usr/local/bin, the libraries (.dll in WIndows) in /usr/lib or /usr/local/lib etc.

The good thing is that you don't care, that's all controlled by the package manager (dpkg in Debian based systems like Ubuntu). So, to see where a particular package has installed its files, you can use this command (using the package xterm as an example) :

$ dpkg-query -L xterm 

So, while it is easy enough to see where everything is installed you rarely need to do so. To remove a package, just use apt:

sudo apt-get remove xterm

You can safely let the system worry about where everything is installed, unlike under Windows, you don't need to have a specific deinstaller to remove each program, the whole thing is managed centrally by the package manager and is actually much more transparent to the user.


The Unix file system has evolved over time, nothing is set in stone, but their are conventions.

It is worth familiarising yourself with it, but doesn't have to be memorised in detail. Wikipedia article

I wouldn't fiddle with your Komodo install, leave it be, as time goes on, you'll become more familiar with the layout.


Linux follows different rules from Windows.

Linux favors the use of a package manager to manage installed software. The way to know whether a program is installed is not by looking for its files, but by searching the list of installed packages. Different distributions use different package manager; under Ubuntu, the GUI is the Software Center, and there are several command line tools that can show whether a package is installed and information about that package, the main ones being:

dpkg -l name-of-package
dpkg -s name-of-package
apt-cache policy name-of-package
aptitude show name-of-package

If a program is installed through the package manager, you don't really care where it's installed: you shouldn't be modifying the files anyway. If you need to investigate something, you can list the files belonging to the package (under Ubuntu, with dpkg -L name-of-package). Software installed by the package manager lives in the directories under / (/bin for executable programs, /lib for code libraries, /sbin for programs useful only to the system administrator) or under /usr (which has these same subdirectories plus a few more). The distinction between / and /usr is historical — back in the days when hard disks were small and /usr could be shared between machines while / was needed to boot.

Programs installed manually by the system administrator, without the package manager, live under /usr/local. These are “local” software installations, as opposed to installations made by the operating system. Windows has a similar distinction — programs under c:\Windows vs programs under c:\Program Files — but it's less noticeable under Windows because very few programs are bundled with the operating system and there is no standard package manager, so pretty much everything ends up in c:\Program Files.

Programs installed by a user end up in that user's home directory.

Linux (like other unix systems) uses this organization where files are grouped by function rather by origin because the function determines how other programs will look for those files. For example, all executables are in a few directories (/bin, /usr/bin, /usr/local/bin, ~/lib) so there is no need to modify the PATH when you install a new program.

What is somewhat inconsistent is the use of /opt. It's for software which is organized the Windows way, with one directory per package. Ubuntu doesn't use it, but a few programs come this way, for example Google Chrome.

In summary:

Location               Managed by
/, /usr                package manager
/usr/local             administrator
/opt                   administrator
~ (home directory)     user

On Ubuntu, if a program isn't provided by the distribution, the easiest way to install it is through a PPA if there is one — which there is for Komodo (see also How do I install Komodo Edit?).

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.