I’m creating this Linux directory structure table as a quick reference for the future. I tend to forget what/where things are in Linux sometimes. Hope this brief information helps somebody else learning about Linux in general. Run an ls -l command to see the contents of each directory.

DirectoryDescription
/Where everything begins. You will see mainly directories.
/bootLinux kernel and boot loader files are kept. The kernel is a file called vmlinuz.
/etcContains configuration files for the system. All files should mostly be text files. Important files to remember in this directory:
/etc/passwd: This is where user’s accounts are defined.
/etc/fstab: This file defines the system’s disk drives. Contains a list of devices the system mounts at boot time.
/etc/hosts: Contains hostnames, IP addresses known to the system.
/etc/init.d: Scripts that start some system services at boot.
/bin, /usr/binThe /bin directory contains essential programs for the system. The /usr/bin has applications for the system’s users.
/sbin, /usr/sbinMainly programs for system administration, mostly for use by the superuser.
/usrContain files that support user applications. For example:
/usr/share/X11: Support for the X Window system.
/usr/share/dict: Dictionaries and spell checking for Linux.
/usr/share/doc: Documentation files in many formats.
/usr/share/man: Man pages live here.
/usr/localUse for the installation of software and other files for use on the local machine. Software that is not part of the OS goes here. Official OS software goes at /usr/bin. You should install software here. Usually, in the /usr/local/bin directory.
/varContains files that change when the system is running. For example log files in the /var/log. Also, holds files in queue for some process in the /var/spool for example print jobs and mail (in the case the system runs local mail)
/libShared libraries (similar to DLLs in Windows) are kept here.
/homeUsers keep their personal files/work. This should be the only location users can write.
/rootSuper user home directory.
/tmpPrograms can write their temporary files here.
/devIt contains devices that are available to the system. In Linux (Unix), devices are treated like files. You can read and write devices as though they were files. For example, /dev/sda is the first hard drive in the system. All the devices that the kernel understands are represented here.
/procThere are a group of numbered entries in this directory that correspond to all the processes running on the system. In addition, there are a number of named entries that permit access to the current configuration of the system. Many of these entries can be viewed. Try viewing /proc/cpuinfo. This entry will tell you what the kernel thinks of the system’s CPU.
/mediaThe /media directory is used by the automatic device mounting mechanisms found in modern desktop oriented Linux distributions. To see what devices and mount points are used, type mount. This directory is mainly used for the system to mount temporary devices such as USB disks and etc..

As always, you can contact me if you have any questions. For now, I’m going to brew an unique Caturra coffee variety from Panama at home. Thanks!

Leave a comment

Your email address will not be published. Required fields are marked *