[Shenlug] BASICS: The Contents of the Root Directory of Your Linux System
mezzenger at gmail.com
Sat Apr 4 01:27:06 EDT 2009
BASICS: The Contents of the Root Directory of Your Linux
Every Linux distribution has file structure that is defined by a convention
established by the designers of the UNIX operating system back in the
Here are descriptions of all the major top level directories which you will
find in the root (/) directory on your Linux system and a brief description
of each directory:
All of the essential user programs are contained in the /bin directory,
these files represent the bare minimum set of tools required to use a Linux
system. Tools like the shell and the file system commands (ls, cd, rm, cat )
are stored here.
The /bin directory usually doesn't receive modification after installation,
except if they are updated in a major release of the operating system. Many
of these programs work the same way they did back in the 70's in the
earliest versions of UNIX.
Files that are used by the Boot Loader (e.g. GRUB), including the kernel
files that are required to start . The boot directory requires little
modification after the installation of the operating system, except when a
new version of the kernel is released. Storing the kernel files in the /boot
directory instead of the root allows for dual-booting.
NOTE: if you want to dual-boot with a version or multi-boot versions of
windows, install all of the windows versions first starting with the oldest
(i. e. 98SE, NT4, 2000, XP, Windows Server 2003, Vista, 2008 . . . )
Again, remember everything in Linux is a file, even hardware devices like
serial ports, hard disks, and scanners. In order for you to be able to
access these devices, a special file called a device node has to be present.
All device nodes are stored in the /dev directory.
Linux system configuration files are stored in the /etc directory. For
example, the X Windows configuration file, the user database, web server
controls and systems startup scripts all reside under the /etc directory.
Linux is a true multiuser operating system, every user on the system is
given an account and a unique home directory (/home/their-name) for personal
files. User home directories contain the files that are located on user's
desktop and other personal files in their home folder. If you plan to have a
lot of users on your system /home should be assigned to it's own hard disk
drive or drive partition.
Required operating systems libraries are found in the /lib directory. These
include the C programming language library, the dynamic loader, other
systems libraries, and kernel modules.
Directory containing the temporary mount points for working on hard disks or
Optional software packages can be installed here to make them easy to remove
later, you are free to add anything you want to /opt.
Various pieces of information that the kernel wants you to know are accessed
via files in the /proc directory. You can also send information to the
kernel through some of these files. For example type: cat /proc/cpuinfo, and
you will see information about your system displayed for you.
Linux's system administrator ( a. k. a. the super user) logs in as the root,
therefore in order to maintain order the super user's home directory is kept
in /root separate from the other users( /home). which allows you to keep the
user directories under /home on a different physical piece of hardware then
the super user's home directory.
Essential programs that are run by root and during the system bootup process
are kept here in /sbin. Only the super user can run programs in this
directory, the super user login name is always "root".
The temporary storage location. All users have read and write access to this
Slash usr (/usr) is the big directory on a Linux system, this is where
applications are installed. For example: source code, executable code,
documentation, the kernel source code, and the X Window system.
Another big directory branch which includes System log files, cache data,
and program lock files are stored here. This is the directory for
frequently-changing data for example systems logs and web sites.
This is the default root directory for your web server, where you would
place your home page in this directory and the create sub-directories for
your web site(s).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Shenlug