Topic : Linux File Structure and Hierarchy
The Linux File Hierarchy Structure or the Filesystem
Hierarchy Standard (FHS) defines the directory structure and
directory contents in Unix-like operating systems.
In FHS,
• all files and directories appear under the root directory /,
even if they are stored on different physical or virtual
devices.
Linux File Structure & Hierarchy
It is a Primary Hierarchy.The root
directory of the entire file system
hierarchy.
• Every single file and directory
starts 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 /
Linux File Structure & Hierarchy
1. / or Root
Essential command binaries that
need to be available in single-user
mode; for all users, e.g., cat, ls, cp.
• Contains binary executables.
• Commands used by all the
users of the system are located
here e.g. ps, ls, ping, grep, cp.
Linux File Structure & Hierarchy
2. /bin
Boot loader files, e.g., kernels, initrd.
• Kernel initrd, vmlinux, grub files
are located under /boot
Linux File Structure & Hierarchy
3. /boot
Essential device files, e.g. /dev/null. .
• These include terminal devices,
usb, or any device attached to
the system.
Linux File Structure & Hierarchy
4. /dev
Host-specific system-wide
configuration files.
• Contains configuration files
required by all programs.
• This also contains startup and
shutdown shell scripts used to
start/stop individual programs.
Linux File Structure & Hierarchy
5. /etc
Host-specific system-wide configuration files.
• Contains configuration files required by all
programs.
• This also contains startup and shutdown
shell scripts used to start/stop individual
programs.
Linux File Structure & Hierarchy
6. /home
Libraries essential for the binaries in
/bin/ and /sbin/.
Linux File Structure & Hierarchy
7. /lib
It shows removable media such as
CD-ROMs,USBs etc.
Linux File Structure & Hierarchy
8. /media
Temporary mount directory where
sysadmins can mount filesystems.
Linux File Structure & Hierarchy
9. /mnt
Optional application software
packages.
Contains add-on applications from
individual vendors.
Linux File Structure & Hierarchy
10. /opt
Essential system binaries, e.g., fsck, init,
route.
• Just like /bin, /sbin also contains
binary executables.
• The linux commands located under
this directory are used typically by
system administrator, for system
maintenance purpose.
Linux File Structure & Hierarchy
11. /sbin
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.
Linux File Structure & Hierarchy
12. /srv
It is a directory that contains
temporary files created by the system
and users.
Files under this directory are deleted
when the system is rebooted.
Linux File Structure & Hierarchy
13. /tmp
Secondary hierarchy for read-only user data;
contains the majority of (multi-)user utilities
and applications.
It contains:
• /usr/bin –binary files for user program.
• /usr/sbin –binary file for system admins.
• /usr/lib- libraries for usr/bin and usr/sbin
• /usr/local – programs we install from
source.
• /usr/src – holds Linux kernel
sources,header- files and documentation.
Linux File Structure & Hierarchy
14. /usr
/usr/bin contains binary files for user
programs.
Linux File Structure & Hierarchy
14.1 /usr/bin
/usr/sbin contains binary files for system
administrators.
Linux File Structure & Hierarchy
14.2 /usr/sbin
/usr/lib contains libraries for /usr/bin and
/usr/sbin
Linux File Structure & Hierarchy
14.3 /usr/lib
/usr/local contains users programs that
we install from source. For example, when
we install apache from source, it goes
under /usr/local/apache2
Linux File Structure & Hierarchy
14.4 /usr/local
/usr/src holds the Linux kernel sources,
header files, and documentation.
Linux File Structure & Hierarchy
14.5 /usr/src
• Contains information about the system
process.
• This is a pseudo filesystem that
contains information about the running
process.
• This is a virtual filesystem with text
information about system resources.
Linux File Structure & Hierarchy
15. /proc
It is a temporary filesystem (tmpfs) that
stores volatile runtime data.
Linux File Structure & Hierarchy
16. /run
ThankYou!!!

Lab 5 Linux File Structure and Hierarchy.pptx

  • 1.
    Topic : LinuxFile Structure and Hierarchy
  • 2.
    The Linux FileHierarchy Structure or the Filesystem Hierarchy Standard (FHS) defines the directory structure and directory contents in Unix-like operating systems. In FHS, • all files and directories appear under the root directory /, even if they are stored on different physical or virtual devices. Linux File Structure & Hierarchy
  • 3.
    It is aPrimary Hierarchy.The root directory of the entire file system hierarchy. • Every single file and directory starts 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 / Linux File Structure & Hierarchy 1. / or Root
  • 4.
    Essential command binariesthat need to be available in single-user mode; for all users, e.g., cat, ls, cp. • Contains binary executables. • Commands used by all the users of the system are located here e.g. ps, ls, ping, grep, cp. Linux File Structure & Hierarchy 2. /bin
  • 5.
    Boot loader files,e.g., kernels, initrd. • Kernel initrd, vmlinux, grub files are located under /boot Linux File Structure & Hierarchy 3. /boot
  • 6.
    Essential device files,e.g. /dev/null. . • These include terminal devices, usb, or any device attached to the system. Linux File Structure & Hierarchy 4. /dev
  • 7.
    Host-specific system-wide configuration files. •Contains configuration files required by all programs. • This also contains startup and shutdown shell scripts used to start/stop individual programs. Linux File Structure & Hierarchy 5. /etc
  • 8.
    Host-specific system-wide configurationfiles. • Contains configuration files required by all programs. • This also contains startup and shutdown shell scripts used to start/stop individual programs. Linux File Structure & Hierarchy 6. /home
  • 9.
    Libraries essential forthe binaries in /bin/ and /sbin/. Linux File Structure & Hierarchy 7. /lib
  • 10.
    It shows removablemedia such as CD-ROMs,USBs etc. Linux File Structure & Hierarchy 8. /media
  • 11.
    Temporary mount directorywhere sysadmins can mount filesystems. Linux File Structure & Hierarchy 9. /mnt
  • 12.
    Optional application software packages. Containsadd-on applications from individual vendors. Linux File Structure & Hierarchy 10. /opt
  • 13.
    Essential system binaries,e.g., fsck, init, route. • Just like /bin, /sbin also contains binary executables. • The linux commands located under this directory are used typically by system administrator, for system maintenance purpose. Linux File Structure & Hierarchy 11. /sbin
  • 14.
    Site-specific data servedby this system, such as data and scripts for web servers, data offered by FTP servers, and repositories for version control systems. Linux File Structure & Hierarchy 12. /srv
  • 15.
    It is adirectory that contains temporary files created by the system and users. Files under this directory are deleted when the system is rebooted. Linux File Structure & Hierarchy 13. /tmp
  • 16.
    Secondary hierarchy forread-only user data; contains the majority of (multi-)user utilities and applications. It contains: • /usr/bin –binary files for user program. • /usr/sbin –binary file for system admins. • /usr/lib- libraries for usr/bin and usr/sbin • /usr/local – programs we install from source. • /usr/src – holds Linux kernel sources,header- files and documentation. Linux File Structure & Hierarchy 14. /usr
  • 17.
    /usr/bin contains binaryfiles for user programs. Linux File Structure & Hierarchy 14.1 /usr/bin
  • 18.
    /usr/sbin contains binaryfiles for system administrators. Linux File Structure & Hierarchy 14.2 /usr/sbin
  • 19.
    /usr/lib contains librariesfor /usr/bin and /usr/sbin Linux File Structure & Hierarchy 14.3 /usr/lib
  • 20.
    /usr/local contains usersprograms that we install from source. For example, when we install apache from source, it goes under /usr/local/apache2 Linux File Structure & Hierarchy 14.4 /usr/local
  • 21.
    /usr/src holds theLinux kernel sources, header files, and documentation. Linux File Structure & Hierarchy 14.5 /usr/src
  • 22.
    • Contains informationabout the system process. • This is a pseudo filesystem that contains information about the running process. • This is a virtual filesystem with text information about system resources. Linux File Structure & Hierarchy 15. /proc
  • 23.
    It is atemporary filesystem (tmpfs) that stores volatile runtime data. Linux File Structure & Hierarchy 16. /run
  • 24.