Unit-V (Operating System)
Unit-V (Operating System)
------------------------------------------------------------------------------------------------------------
The Linux File Hierarchy Structure or the File system Hierarchy Standard (FHS) defines the directory
structure and directory contents in Unix-like operating systems. It is maintained by the Linux
Foundation.
In the FHS, all files and directories appear under the root directory /, even if they are stored on
different physical or virtual devices.
Some of these directories only exist on a particular system if certain subsystems, such as the X
Window System, are installed.
Most of these directories exist in all UNIX operating systems and are generally used in much the
same way; however, the descriptions here are those used specifically for the FHS and are not
considered authoritative for platforms other than Linux.
1. / (Root): Primary hierarchy root and root directory of the entire file system hierarchy.
Every single file and directory start from the root directory.
The only root user has the right to write under this directory.
/root is the root user’s home directory, which is not the same as /
2. /bin: Essential command binaries that need to be available in single-user mode; for all users, e.g.,
cat, ls, cp.
6. /home: Users’ home directories, containing saved files, personal settings, etc.
8. /media: Mount points for removable media such as CD-ROMs (appeared in FHS-2.3).
Temporary mount directory for removable devices.
Examples, /media/cdrom for CD-ROM; /media/floppy for floppy drives; /media/cdrecorder for
CD writer
12. /srv : Site-specific data served by this system, such as data and scripts for web servers, data offered
by FTP servers, and repositories for version control systems.
13. /tmp :Temporary files. Often not preserved between system reboots and may be severely size
restricted.
14. /usr : Secondary hierarchy for read-only user data; contains the majority of (multi-)user utilities
and applications.
Contains binaries, libraries, documentation, and source-code for second level programs.
/usr/bin contains binary files for user programs. If you can’t find a user binary under /bin, look
under /usr/bin. For example: at, awk, cc, less, scp
/usr/sbin contains binary files for system administrators. If you can’t find a system binary
under /sbin, look under /usr/sbin. For example: atd, cron, sshd, useradd, userdel
/usr/lib contains libraries for /usr/bin and /usr/sbin
/usr/local contains user’s programs that you install from source. For example, when you install
apache from source, it goes under /usr/local/apache2
/usr/src holds the Linux kernel sources, header-files and documentation.
15. /proc: Virtual filesystem providing process and kernel information as files. In Linux, it corresponds
to a procs mount. Generally, automatically generated and populated by the system, on the fly.