FLOPPIX Home | FAQ | Download | Labs | ToC | Back |  Next 

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:

  1. /bin - stores essential binaries (programs) needed when booting the system or working in single user mode to maintain the system
  2. /boot - stores kernel images and boot configuration files
  3. /dev - stores device special files used to access hardware devices
  4. /etc - stores system configuration files
  5. /home - stores the home directories for the individual users
  6. /lib - stores library modules used by the commands
  7. /mnt - a mount point for other storage devices
  8. /proc - a pseudo filesystem for conveying data about processes
  9. /sbin - stores commands  required to administer the system
  10. /tmp - used for temporary files
  11. /usr - used for programs, libraries, documentation, etc used by normal users
  12. /var - stored system data that varies or changes frequently such as system logs, mail and print spool files, etc


Questions and Answers:

  1. In the Linux filesystem, which directory stores system configuration files?
     
    Answer: /etc.
     
  2. 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.
     
  3. Suppose you are user "xyz". Where is your home directory in the diagram shown above?
     
    Answer: /home/xyz
     
  4. 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
     
  5. 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.
     
  6. 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
FLOPPIX Home | FAQ | Download | Labs | ToC | Back |  Next