Core dump overflow

Core dump in progress...

Touring the Linux directories

| Comments

The Linux directory tree can be a bit daunting, to say the least, for those coming from Windows backgrounds and accustomed to visiting only Documents and Program Files directories. So I thought about summarizing the important directories in the filesystem hierarchy. Here it goes.

/ This is the root directory, the starting point for the filesystem tree. This is not the same as the root user’s home directory, which is /root. Only the root user has write privileges inside this directory.

/boot Contains static files needed for booting. The boot loader, the initial RAM disk image and the Linux kernel are among the most important things you’ll find here.

/bin Binaries (executables) for the common utilities that are used by all users on the system (such as ls, grep, shells etc.) are located here. The programs stored here need to be available in single user mode.

/dev Device files associated with physical hardware are found here. There are some virtual devices here that don’t correspond to physical devices, like /dev/random, that creates random numbers, and the (in)famous black hole, /dev/null.

/etc In here there are system-wide configuration files for all programs. Scripts for starting / stopping services are also found here. This is a very important directory, since the configuration of the entire system depends on it. That’s why it should be backed up on a regular basis, to save all the configuration details in case something bad might happen that requires re-installation. The configuration files are text files that can be edited manually.

/home The home directories for all users reside here. Every user keeps his data and user defined configuration files here. Users have supreme power and privileges inside their home directory.

/lib Here you can find the shared libraries (the equivalents of Windows DLLs) required by the core system binaries. The /modules subdirectory contains kernel modules (drivers that can be loaded and unloaded as needed.

/media Mount points for removable media, such as CDs, DVDs, USBs, are found in this directory.

/mnt This is a generic mount point for mounting temporary filesystems.

/opt This directory holds optional software packages and third party applications that aren’t found in a default Linux installation, such as commercial software.

/proc This is a pseudo filesystem that contains information about the system resources and running processes.

/root This is the home directory for the root user.

/sbin Here you can find system binaries that are used for system maintenance and administrative tasks, like ifconfig, fdisk etc.

/tmp In here you can find temporary files that are normally deleted when the system restarts. Applications may store here some files needed for their operation, that can get deleted on the fly by utilities such as cron jobs when they are no longer required.

/lost+found In case of a system crash, the system will do a filesystem check at the next boot, attempting to recover files that got corrupted during the crash. These files will be placed here. Note that there is a high change the files aren’t completely recovered.

/usr Non critical user binaries are placed here, along with their documentation and libraries. This is the largest directory on a Linux system. In the /usr/local directory you can find locally compiled software. The /usr/src directory holds kernel source files and headers.

/var This directory holds variable files that are expected to grow in size. Various types of files can be found here, such as log files, databases, mail, print queues, lock files and other runtime files.

/srv Contains data for services provided by servers.

And the cookie:

Try to have as good a life as you can under the circumstances.

Comments