Sunday, July 19, 2009

Linux File System Hierarchy

Because everything in Linux is a file, you, as an administrator, are ultimately going to have to deal with files. This makes it very important to understand the Linux file system hierarchy. Most Unixes/Linuxes adhere to the Filesystem Hierarchy Standard which defines a universal/standard directory structure for a Linux/Unix operating system.

Here is a brief overview of the most commonly available directories on a standard Linux system and their purpose:

/bin = houses basic binaries like ls, cat, mv, date, kill, and ps etc.
/boot = houses boot and kernel-specific files.
/dev = houses device files.
/etc = houses host-specific configuration files.
/home = houses user-specific home directories.
/root = home directory of root user.
/lib = houses shared library files used by various programs.
/lost+found = contains files/directories that have gone corrupted, items referred to by bad inodes, lost file fragments and the likes.
/mnt = houses mount points for various removable devices like CD and Floppy.
/opt = houses add-on applications (StarOffice from Sun Microsystems, for example).
/proc = a virtual directory providing stats on file system, processor, and memory etc.
/sbin = houses system binaries (such as reboot, halt, route, and fdisk) accessible to root only.
/tmp = a location for storing temporary data.
/usr = houses applications that are accessible to ALL users on the system such as a Web browser and gzip.
/var = provides space for housing data that changes frequently such as print/mail jobs and log files.

Cheers!

No comments: