Organization of the Filesystem
Notes:
When you teleport into your office, it helps to have some idea of the layout
of the office complex and the location of your own office in the complex.
Eventually you will need to find the necessities of life (such as the coffee
machine).
When you login to a linux system, you will be located in your own home directory.
It helps to have some idea of the organization of the rest of the file system
(especially when you are appointed the system administrator of your own system).
Structure of the logical filesystem:
/
+----+-----+----+----+-----+----+-----+-----+----+----+----+
bin boot dev etc home lib mnt proc sbin tmp usr var
| |
+---+---+ +---+---+
abc lmn xyz bin lib sbin
|
+-----+
notes labs
The Linux filesystem is organized in a hierarchical structure starting at
the root directory (designated by /) as shown in the figure above.
Organization of files in the standard directory structure:
-
/bin - stores essential binaries (programs) needed when booting the system
or working in single user mode to maintain the system
-
/boot - stores kernel images and boot configuration files
-
/dev - stores device special files used to access hardware devices
-
/etc - stores system configuration files
-
/home - stores the home directories for the individual users
-
/lib - stores library modules used by the commands
-
/mnt - a mount point for other storage devices
-
/proc - a pseudo filesystem for conveying data about processes
-
/sbin - stores commands required to administer the system
-
/tmp - used for temporary files
-
/usr - used for programs, libraries, documentation, etc used by normal users
-
/var - stored system data that varies or changes frequently such as system
logs, mail and print spool files, etc
Questions and Answers:
-
In the Linux filesystem, which directory stores system configuration files?
Answer: /etc.
-
In the Linux filesystem, which directory would store files which are queued
for printing?
Answer: A directory under /var since the jobs in the print queue and
the size of the print queue will change frequently.
-
Suppose you are user "xyz". Where is your home directory in the diagram shown
above?
Answer: /home/xyz
-
To save space, code that is common to many commands is stored in library
files. Which two directories in the filesystem shown above will contain library
files?
Answer: /lib and /usr/lib
-
What is the difference between the / directory which is called the root directory
and the /root directory.
Answer: The / directory is the root directory which is the starting
point for the filesystem and contains every other entry in the filesystem.
The /root directory is the home directory for the "root" user who is usually
the "superuser" or system administrator. Linux uses "root" in many different
ways.
-
Help! On my linux system, the logical filesystem is organized differently
and my textbook defines things a third way.
Answer: Sigh! There have been many attempts to standardize the file
system organization. Work with your system and your textbook.
Copyright © L.
M. MacEwan