Linux Directory Structure

To a Windows user the Linux Directory Structure can seem very foriegn. Here is a quick synopsis of the standard top level Directory Structure on a standard Linux box.

/ : The top level directory in the system. This is often called the root directory, because it is the 'root' of the filesystem, though there is, in fact, a /root directory.

/bin : The home of binaries for your system. The /bin directory is in the PATH environment variable by default, meaning that any executable file in this directory can be executed merely by entering the file name at the command line – provided you have executable permissions.

/boot : Contains files necessary to boot your system. These include the kernel image and system.map.

/dev : The dev directory is the top level of device abstraction in Linux. This is where each device filesystem will be mounted from. Interfaces to your hard drives, cdrom, mouse and sound card are all found here.

/etc : Most configuration files in Linux are contained in the /etc directory. This also houses startup scripts.

/home : The home directories for each system user. A user is placed in /home/ when logging in.

/lib : Default location for Library files shared throughout your system, although libraries can be stored in any directory as long as it is added to /etc/ld.so.conf.

/proc : Another abstraction directory, /proc contains information about the processes on your system.

/root : The home directory of the root user.

/sbin : Contains additional system binaries, most of which are admin tools. You'll need to be logged in as root to run many of these files, although you may be able to run them by explicitly specifying the path (/sbin/ifconfig).

/tmp : The temporary directory.

/usr : The /usr directory contains subdirectories that will be used system-wide by all users. These may include binaries, libraries, man files, and other user resources. This is also a good place to add new applications. When updating the operating system it is much easier to peruse /usr for applications than search the whole filesystem.

/var : Contains the variable data that's always changing as the system runs. This directory contains logs files, mail directories and printing spools.