0% found this document useful (0 votes)
54 views21 pages

(Backup) ITEC3116-SNAL-Lecture 08 - File System Hierarchy

This document provides an overview of the Linux file system structure and hierarchy. It discusses key directories like /, /bin, and /dev. / contains the root directory and all other directories branch off from it. /bin contains essential commands, while /dev stores device files that represent hardware components. The lecture continues explaining additional subdirectories and how they are organized according to the Filesystem Hierarchy Standard.

Uploaded by

Hassnain Ijaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views21 pages

(Backup) ITEC3116-SNAL-Lecture 08 - File System Hierarchy

This document provides an overview of the Linux file system structure and hierarchy. It discusses key directories like /, /bin, and /dev. / contains the root directory and all other directories branch off from it. /bin contains essential commands, while /dev stores device files that represent hardware components. The lecture continues explaining additional subdirectories and how they are organized according to the Filesystem Hierarchy Standard.

Uploaded by

Hassnain Ijaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

System and Network

Administration Linux based

File System Hierarchy


Lecture 8-Week 4,
May 2020.
Recap of the previous Lecture
File System Structure
 Ubuntu Terminal/Bash
 Linux File System
 I Nodes
Agenda for Today’s Class
File System Structure
 File System Structure and
Hierarchy
 Structure and commands of
Subdirectories
Filesystem Hierarchy Standard

 Started by Dennis Ritchie, 1993


 Defines the main directories and their
contents in most Linux-based
systems.

4
FHS

 There is not any drive i.e. C:, D:, E:,


and so on.
 All directories are under “/”
 “/” is the Root Directory
 It is possible
 to have multiple partitions
 to multiple filesystems

5
The Hierarchical Structure of
the Linux File System
The Role of the Linux File
System
- The data is organized and can be easily
located .
- The data can be easily retrieved at any
later point in time .
-The integrity of the data is preserved .
The “/”

 The primary hierarchy in FHS


 The root of tree of filesystem
 All paths start form here
 There is only one “/” in filesystem
 /root is root user’s home directory,
which is not same as /

8
The “/”

boot bin dev etc lib proc root sbin tmp usr var

9
 Notice that the topmost directory in the
structure is the / directory, that is called
the root directory.
 Beneath the root directory, there are a
series of subdirectories.
 Specifications for how these directories
are to be named contained in the
Filesystem Hierarchy Standard (FHS).
/boot

 Linux kernel
 Boot loader configuration
 If you lost boot
 You cannot boot your OS

11
/boot

boot

vmlinuz-2.6.12 config-2.6.12 grub

grub.conf

12
/bin
 Contains several useful commands that are
of use to both the system administrator as
well as non-privileged users.
 Usually contains the shells like bash, csh,
etc.... and commonly used commands like
cp, mv, rm, ls.
 There are no (real) subdirectories in /bin

13
bin

bin

bash bzip2 cat ... gzip ls mv rm

14
1. /bin …(cont)

 cat  hostname  rm
 chgrp  kill  rmdir
 chmod  ln  sed
 chown  login  sh
 ls  stty
 cp
 mkdir
 date  su
 mknod
 dd  more  sync
 df  mount  true
 dmesg  mv  umount
 echo  ps  uname
 false  pwd
15
/bin detail

 cat → Utility to concatenate files to standard output


 chmod → Utility to change file access permissions
 cp → Utility to copy files and directories
 date → Utility to print or set the system date and time
 df → Utility to report filesystem disk space usage
 echo → Utility to display a line of text
 false → Utility to do nothing, unsuccessfully

16
/bin detail (cont)

 hostname → Utility to show or set the system's host name


 kill → Utility to send signals to processes
 ln → Utility to make links between files
 login → Utility to begin a session on the system
 ls → Utility to list directory contents
 mkdir → Utility to make directories
 more → Utility to page through text
 mount → Utility to mount a filesystem
 mv → Utility to move/rename files

17
/bin detail (cont)

 pwd → Utility to print name of current working directory


 rm → Utility to remove files or directories
 rmdir → Utility to remove empty directories
 sh → The Bourne command shell
 su → Utility to change user ID
 sync → Utility to flush filesystem buffers
 true → Utility to do nothing, successfully
 umount → Utility to unmount file systems
 uname → Utility to print system information

18
/dev

 Usually is the location of device files


 A device and a file both can be read from and
written to. So config a device is same with edit
a file. EXP: sending data to /dev/ttyS0 that
means you are sending data to a
communication device, such as a modem.
 'block devices' are devices that store or hold
data
 'character devices' can be thought of as
devices that transmit or transfer data

19
/dev … detail

 /dev/ttyS0 → Device connected to Com1 (Modem, mouse,..)


 /dev/psaux → PS/2 mouse connection
 /dev/lp0 → First parallel port
 /dev/dsp → Sound card (digital signal processor)
 /dev/usb → USB device nodes.
 /dev/sda → First SCSI device
 /dev/scd → First SCSI CD-ROM device
 /dev/cdrom → CD-ROM drive
 /dev/fd0 → floppy drive
 /dev/had → The partition on primary hdd

20
Sub Directories……

 The lecture will continue in the next


class

You might also like