Pages

Tuesday, May 7, 2013

Important Directories In Linux File System Structure

First of all, what is Linux?
Experienced geeks will define Linux as an open source kernel, that requires additional software in order to make it an operating system but in layman terms, Linux is an open source operating system. And it's entirely different from proprietary operating system like Windows.

Linux file system is based on a series of folders in the root directory. Some of these folders contain important system files that cannot be modified unless you are running as the root user or use sudo.
This restriction exists for both security and safety reasons: computer malware and virus will not be able to change the core system files (which means you are safer while using Linux than Windows) and ordinary users will not be able to accidentally damage anything vital.

We begin our discussion with some of the most important directories in the root file system.
"/"
This directory is known as the root of the filesystem, or the root directory (not to be confused with the root user though).

"/boot"
This directory contains all the files that Linux requires in order to bootstrap the system; this is typically just the Linux kernel and its associated driver modules.

"/dev"
This directory contains all the device file nodes that the kernel and system would make use of.

"/bin", "/sbin" and "/lib"
These directories contain critical binary (executable) files which are necessary to boot the system up into a usable state, as well as utilities to help repair the system should there be a problem. The "/sbin" directory contains system utilities and many essential system applications (equivalent to C:\Windows).

"/usr"
This directory was historically used to store "user" files, but its use has changed in time and is now used to store files which are used during everyday running of the machine, but which are not critical to booting the machine up. These utilities are similarly broken up into "/usr/sbin" for system utilities, and "/usr/bin" for normal user applications. This is equivalent to C:\Program Files in Windows.

"/etc"
This directory contains almost all of the system configuration files. This is probably the most important directory on the system; after an installation the default system configuration files are the ones that will be modified once you start setting up the system to suit your requirements.

"/home"
This directory contains all the users data files. Each user will have a subdirectory to store personal files (for example, /home/yourusername) which is equivalent to C:\Users or C:\Documents and Settings in Windows.

"/var"
This directory contains the user files that are continually changing

"/lib"
Library files, similar to .dll files on Windows.

"/proc"
This directory provides details information about various hardware devices and other linux kernel information like CPU info and Memory info.

Every directory in Linux has a complete path that starts with the / (the root directory) and ends in the directory's own name.
Previous Articles