SlideShare a Scribd company logo
Advanced System Programming
Advanced System Programming
1
Classification of Programming Languages
2
Compilation V/S Interpreration
3
Compilation Stages
4
Introduction to Linux
5
 In the early 1990s, Torvalds became interested in a freeware product called
Minix were written by Andrew S. Tanenbaum. Developed by Andrew
S.Tanenbaum, Minix was a clone of the commercial UNIX operating system.
 Linux version 0.02, released on October 5, 1991, consisted of only the Linux
kernel and three utilities:
 bash : a command-line interface
 update : a utility for flushing file system buffers
 gcc : a C++ compiler
 Today used on 7-10 million computers with 1000’s of programmers working
to enhance it around the world.
Introduction to Linux
6
 GNU Project: Richard Stallman on September 27th 1983.
 The GNU Project was launched in 1984 to develop a complete Unix-like
operating system which is free software: the GNU system.
 GNU's kernel isn't finished, so GNU is used with the kernel Linux. The
combination of GNU and Linux is the GNU/Linux operating system, now
used by millions.
What is Linux
7
 A fully-networked 32/64-Bit Unix-like Operating System
 Unix Tools Like sed, awk, and grep (explained later)
 Compilers Like C, C++, Fortran, Smalltalk, Ada
 Network Tools Like telnet, ftp, ping, traceroute
 Multi-user, Multitasking, Multiprocessor
 Has the X Windows GUI
 Coexists with other Operating Systems
 Runs on multiple platforms
 Includes the Source Code
Component of Linux
8
 The Linux Kernel
 Libraries
 Utilities
 User Interface
Linux Kernel
9
Linux Kernel
10
Libraries are pre-written code “pieces” that application programmers use in
their programs.
Utilities maintaining the file system, editing text files, managing running
processes, and installing new software packages.
User Interface command-line interface (CLI) and a graphical user interface
(GUI).
Kernel Space and User Space
11
 The Concept of kernel space and user space is all about memory and
access rights.
 It is a feature of modern CPU, allowing it to operate either in
privileged or unprivileged mode.
 One ,may consider kernel to be privileged and user apps are
restricted.
Kernel Space and User Space
12
Linux Filesystem Hierarchy
13
 The Linux File Hierarchy Structure or the Filesystem 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.
Linux Filesystem Hierarchy
14
Linux Filesystem Hierarchy
15
 / (root)
• Primary hierarchy root and is the first directory and the root directory of
the entire file system hierarchy.
• It contains all other directories i.e. the sub directories.
• Only the root user has the permissions to write here.
• This is not the home directory for the root user
 /bin (user binaries)
• It contains binary executables.
• Binary executables of common linux commands used by all users in
single-user mode are located in this directory.
• Some files present in this directory are: ls, cp, grep, ping, cat, etc.
Linux Filesystem Hierarchy
16
 /boot (boot loader files)
• It contains boot loader files.
• kernel, initrd, grub, and other files and directories are located in this
directory.
• e.g. vmlinux-2.7.31.25-generic, initrd.img-2.3.32.24-generic, etc.
 /dev (device files)
• It contains the essential files related to the devices attached to the system.
• This includes terminal devices, USB, network devices and any other
devices that are attached to the system.
• e.g. /dev/usbmon0 , /dev/tty1 , /dev/null , etc.
Linux Filesystem Hierarchy
17
 /etc (configuration files)
• etc stands for ‘edit to config’
• This directory contains the configuration files that are required by the
installed programs.
• The files are host-specific and system-wide configurations needed for the
proper functioning of the system.
• This directory also contains shell scripts for system startup and system
shutdown that are used to start or stop individual programs.
• The files in this directory should not be edited without proper knowledge of
system configuration as improper configuration could brick the system.
• e.g. /etc/passwd , /etc/shadow , /etc/group , /etc/resolv.conf , etc.
Linux Filesystem Hierarchy
18
 /home (home directories)
• This directory contains user’s home directories, containing saved files and personal
settings.
• Each user will have an separate directory with their username under this directory except
the root user because every time a new user is created, a directory is created in the name
of the user within the home directory.
• e.g. /home/user , /home/sage , /home/guest , etc.
 /lib (system libraries)
• This directory contains libraries that are essential for the binaries in /bin and /sbin
• Library filenames are either ld* or lib*.so.*
• e.g. ld-2.11.1.so , etc.
 /media (removable media devices)
• Temporary mount directory for removable media such as CD-ROM.
• e.g. /media/cdrom for CD-ROM ; /media/floppy for floppy drives ; /media/cdrecorder
for CD writer ; etc.
Linux Filesystem Hierarchy
19
 /mnt (mount directory)
• Temporary mount directory where system administrator can mount file systems.
 /opt (optional application software packages)
• This directory contains add-on applications from individual vendors.
 /proc (process information)
• This is a virtual filesystem providing process and kernel information. This files in this
directory are automatically generated, populated and deleted by the system. In Linux,
corresponds to a procfs mount.
• This directory contains information about the processes running in the system.
• This directory also contains text information about running processes. e.g.
/proc/uptime
• e.g. /proc/{pid} directory contains information about the process with that particular pid
that will be mentioned within the brackets.
Linux Filesystem Hierarchy
20
 /root (root directory)
• This is the home directory for the root user.
 /sbin (system binaries)
• This directory contains essential system binaries.
• The linux commands that are located in this directory are used by system administrator,
for system maintenance and configuration purpose.
e.g. fsck , reboot , fdisk , ifconfig , init , etc.
Linux Filesystem Hierarchy
21
 /root (root directory)
• This is the home directory for the root user.
 /sbin (system binaries)
• This directory contains essential system binaries.
• The linux commands that are located in this directory are used by system administrator,
for system maintenance and configuration purpose.
e.g. fsck , reboot , fdisk , ifconfig , init , etc.
 /srv (service data)
• This directory contains site-specific data served by the system, such as data and scripts
for web servers, data offered by FTP servers, and repositories for version control systems
i.e. server specific services related data.
e.g. /srv/cvs contains CVS related data , etc.
Linux Filesystem Hierarchy
22
 /sys (system)
• This directory contains information about devices, drivers, and some kernel features.
 /tmp (temporary files)
• This directory contains temporary files created by system and the users that will be
rebooted when the system is rebooted.
 /usr (user programs)
• This directory contains read-only user data like binaries, libraries, documentation and
source-code for second level programs like user utilities and applications.
• /usr/bin → contains binary files for user programs. If you can’t find a user binary under
/bin, then we should look under /usr/bin.
• /usr/include → contains standard include files.
Linux Filesystem Hierarchy
23
• /usr/lib → contains libraries for the binaries in /usr/bin and /usr/sbin
• /usr/local → tertiary hierarchy for local data. contains users programs that you install
from source. e.g., when you install apache, it goes under /usr/local/apache2
• /usr/sbin → /usr/sbin contains binary files for system administrators. If you can’t find a
system binary under /sbin, then you should look under /usr/sbin. It also contains non-
essential system binaries. e.g. daemons for network-services.
 /var (variable files)
• This directory contains files whose content is expected to continually change during
normal operation of the system—such as logs, spool files, and temporary e-mail file.
• /var/log → contains system log files.
Thank you
24
Ad

More Related Content

Similar to LinuxTraining_26_Sept_2021.ppt (20)

Basic linux architecture
Basic linux architectureBasic linux architecture
Basic linux architecture
Rohit Kumar
 
File system discovery
File system discovery File system discovery
File system discovery
DevMix
 
File system hiearchy
File system hiearchyFile system hiearchy
File system hiearchy
sritolia
 
Tahir Ashraf [Linux file system herarchy].pptx
Tahir Ashraf [Linux file system herarchy].pptxTahir Ashraf [Linux file system herarchy].pptx
Tahir Ashraf [Linux file system herarchy].pptx
SayedtahirAshraf
 
OS Lab: Introduction to Linux
OS Lab: Introduction to LinuxOS Lab: Introduction to Linux
OS Lab: Introduction to Linux
Motaz Saad
 
Network and System Administration Power Point
Network and System Administration Power PointNetwork and System Administration Power Point
Network and System Administration Power Point
kemal678348
 
Unix operating system architecture with file structure
Unix operating system architecture with file structure Unix operating system architecture with file structure
Unix operating system architecture with file structure
amol_chavan
 
Linux administration classes in mumbai
Linux administration classes in mumbaiLinux administration classes in mumbai
Linux administration classes in mumbai
Vibrant Technologies & Computers
 
File system discovery
File system discovery File system discovery
File system discovery
MOHAMED Elshawaf
 
Linux basics
Linux basics Linux basics
Linux basics
suniljosekerala
 
Introduction to Unix
Introduction to UnixIntroduction to Unix
Introduction to Unix
Nishant Munjal
 
Lesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File SystemLesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File System
Sadia Bashir
 
Linux basics
Linux basics Linux basics
Linux basics
suniljosekerala
 
Cha-2- Software Maintenance Part-2.gghgpptx
Cha-2- Software Maintenance Part-2.gghgpptxCha-2- Software Maintenance Part-2.gghgpptx
Cha-2- Software Maintenance Part-2.gghgpptx
merir143
 
Linux fundamentals
Linux fundamentalsLinux fundamentals
Linux fundamentals
Raghu nath
 
Linux technology
Linux technologyLinux technology
Linux technology
Prakash Poudel
 
Linux introduction (eng)
Linux introduction (eng)Linux introduction (eng)
Linux introduction (eng)
Anatoliy Okhotnikov
 
LINUX (1).pptxtytyyyyyyuuuuuuuuuuurttttttrrrrrr
LINUX (1).pptxtytyyyyyyuuuuuuuuuuurttttttrrrrrrLINUX (1).pptxtytyyyyyyuuuuuuuuuuurttttttrrrrrr
LINUX (1).pptxtytyyyyyyuuuuuuuuuuurttttttrrrrrr
0710harish
 
introduction to Linux operating system .pptx
introduction to Linux operating system .pptxintroduction to Linux operating system .pptx
introduction to Linux operating system .pptx
AnuradhaJadiya1
 
Operating Systems: Linux in Detail
Operating Systems: Linux in DetailOperating Systems: Linux in Detail
Operating Systems: Linux in Detail
Damian T. Gordon
 
Basic linux architecture
Basic linux architectureBasic linux architecture
Basic linux architecture
Rohit Kumar
 
File system discovery
File system discovery File system discovery
File system discovery
DevMix
 
File system hiearchy
File system hiearchyFile system hiearchy
File system hiearchy
sritolia
 
Tahir Ashraf [Linux file system herarchy].pptx
Tahir Ashraf [Linux file system herarchy].pptxTahir Ashraf [Linux file system herarchy].pptx
Tahir Ashraf [Linux file system herarchy].pptx
SayedtahirAshraf
 
OS Lab: Introduction to Linux
OS Lab: Introduction to LinuxOS Lab: Introduction to Linux
OS Lab: Introduction to Linux
Motaz Saad
 
Network and System Administration Power Point
Network and System Administration Power PointNetwork and System Administration Power Point
Network and System Administration Power Point
kemal678348
 
Unix operating system architecture with file structure
Unix operating system architecture with file structure Unix operating system architecture with file structure
Unix operating system architecture with file structure
amol_chavan
 
Lesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File SystemLesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File System
Sadia Bashir
 
Cha-2- Software Maintenance Part-2.gghgpptx
Cha-2- Software Maintenance Part-2.gghgpptxCha-2- Software Maintenance Part-2.gghgpptx
Cha-2- Software Maintenance Part-2.gghgpptx
merir143
 
Linux fundamentals
Linux fundamentalsLinux fundamentals
Linux fundamentals
Raghu nath
 
LINUX (1).pptxtytyyyyyyuuuuuuuuuuurttttttrrrrrr
LINUX (1).pptxtytyyyyyyuuuuuuuuuuurttttttrrrrrrLINUX (1).pptxtytyyyyyyuuuuuuuuuuurttttttrrrrrr
LINUX (1).pptxtytyyyyyyuuuuuuuuuuurttttttrrrrrr
0710harish
 
introduction to Linux operating system .pptx
introduction to Linux operating system .pptxintroduction to Linux operating system .pptx
introduction to Linux operating system .pptx
AnuradhaJadiya1
 
Operating Systems: Linux in Detail
Operating Systems: Linux in DetailOperating Systems: Linux in Detail
Operating Systems: Linux in Detail
Damian T. Gordon
 

Recently uploaded (20)

Introduction to FLUID MECHANICS & KINEMATICS
Introduction to FLUID MECHANICS &  KINEMATICSIntroduction to FLUID MECHANICS &  KINEMATICS
Introduction to FLUID MECHANICS & KINEMATICS
narayanaswamygdas
 
Raish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdfRaish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdf
RaishKhanji
 
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdffive-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
AdityaSharma944496
 
theory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptxtheory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptx
sanchezvanessa7896
 
Mathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdfMathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdf
TalhaShahid49
 
Compiler Design_Lexical Analysis phase.pptx
Compiler Design_Lexical Analysis phase.pptxCompiler Design_Lexical Analysis phase.pptx
Compiler Design_Lexical Analysis phase.pptx
RushaliDeshmukh2
 
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design ThinkingDT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DhruvChotaliya2
 
Compiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptxCompiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptx
RushaliDeshmukh2
 
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G..."Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
Infopitaara
 
RICS Membership-(The Royal Institution of Chartered Surveyors).pdf
RICS Membership-(The Royal Institution of Chartered Surveyors).pdfRICS Membership-(The Royal Institution of Chartered Surveyors).pdf
RICS Membership-(The Royal Institution of Chartered Surveyors).pdf
MohamedAbdelkader115
 
The Gaussian Process Modeling Module in UQLab
The Gaussian Process Modeling Module in UQLabThe Gaussian Process Modeling Module in UQLab
The Gaussian Process Modeling Module in UQLab
Journal of Soft Computing in Civil Engineering
 
Data Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptxData Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptx
RushaliDeshmukh2
 
Introduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptxIntroduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptx
AS1920
 
International Journal of Distributed and Parallel systems (IJDPS)
International Journal of Distributed and Parallel systems (IJDPS)International Journal of Distributed and Parallel systems (IJDPS)
International Journal of Distributed and Parallel systems (IJDPS)
samueljackson3773
 
new ppt artificial intelligence historyyy
new ppt artificial intelligence historyyynew ppt artificial intelligence historyyy
new ppt artificial intelligence historyyy
PianoPianist
 
fluke dealers in bangalore..............
fluke dealers in bangalore..............fluke dealers in bangalore..............
fluke dealers in bangalore..............
Haresh Vaswani
 
Avnet Silica's PCIM 2025 Highlights Flyer
Avnet Silica's PCIM 2025 Highlights FlyerAvnet Silica's PCIM 2025 Highlights Flyer
Avnet Silica's PCIM 2025 Highlights Flyer
WillDavies22
 
Metal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistryMetal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistry
mee23nu
 
Artificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptxArtificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptx
aditichinar
 
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptxExplainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
MahaveerVPandit
 
Introduction to FLUID MECHANICS & KINEMATICS
Introduction to FLUID MECHANICS &  KINEMATICSIntroduction to FLUID MECHANICS &  KINEMATICS
Introduction to FLUID MECHANICS & KINEMATICS
narayanaswamygdas
 
Raish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdfRaish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdf
RaishKhanji
 
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdffive-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
AdityaSharma944496
 
theory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptxtheory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptx
sanchezvanessa7896
 
Mathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdfMathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdf
TalhaShahid49
 
Compiler Design_Lexical Analysis phase.pptx
Compiler Design_Lexical Analysis phase.pptxCompiler Design_Lexical Analysis phase.pptx
Compiler Design_Lexical Analysis phase.pptx
RushaliDeshmukh2
 
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design ThinkingDT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DhruvChotaliya2
 
Compiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptxCompiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptx
RushaliDeshmukh2
 
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G..."Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
Infopitaara
 
RICS Membership-(The Royal Institution of Chartered Surveyors).pdf
RICS Membership-(The Royal Institution of Chartered Surveyors).pdfRICS Membership-(The Royal Institution of Chartered Surveyors).pdf
RICS Membership-(The Royal Institution of Chartered Surveyors).pdf
MohamedAbdelkader115
 
Data Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptxData Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptx
RushaliDeshmukh2
 
Introduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptxIntroduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptx
AS1920
 
International Journal of Distributed and Parallel systems (IJDPS)
International Journal of Distributed and Parallel systems (IJDPS)International Journal of Distributed and Parallel systems (IJDPS)
International Journal of Distributed and Parallel systems (IJDPS)
samueljackson3773
 
new ppt artificial intelligence historyyy
new ppt artificial intelligence historyyynew ppt artificial intelligence historyyy
new ppt artificial intelligence historyyy
PianoPianist
 
fluke dealers in bangalore..............
fluke dealers in bangalore..............fluke dealers in bangalore..............
fluke dealers in bangalore..............
Haresh Vaswani
 
Avnet Silica's PCIM 2025 Highlights Flyer
Avnet Silica's PCIM 2025 Highlights FlyerAvnet Silica's PCIM 2025 Highlights Flyer
Avnet Silica's PCIM 2025 Highlights Flyer
WillDavies22
 
Metal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistryMetal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistry
mee23nu
 
Artificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptxArtificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptx
aditichinar
 
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptxExplainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
MahaveerVPandit
 
Ad

LinuxTraining_26_Sept_2021.ppt

  • 5. Introduction to Linux 5  In the early 1990s, Torvalds became interested in a freeware product called Minix were written by Andrew S. Tanenbaum. Developed by Andrew S.Tanenbaum, Minix was a clone of the commercial UNIX operating system.  Linux version 0.02, released on October 5, 1991, consisted of only the Linux kernel and three utilities:  bash : a command-line interface  update : a utility for flushing file system buffers  gcc : a C++ compiler  Today used on 7-10 million computers with 1000’s of programmers working to enhance it around the world.
  • 6. Introduction to Linux 6  GNU Project: Richard Stallman on September 27th 1983.  The GNU Project was launched in 1984 to develop a complete Unix-like operating system which is free software: the GNU system.  GNU's kernel isn't finished, so GNU is used with the kernel Linux. The combination of GNU and Linux is the GNU/Linux operating system, now used by millions.
  • 7. What is Linux 7  A fully-networked 32/64-Bit Unix-like Operating System  Unix Tools Like sed, awk, and grep (explained later)  Compilers Like C, C++, Fortran, Smalltalk, Ada  Network Tools Like telnet, ftp, ping, traceroute  Multi-user, Multitasking, Multiprocessor  Has the X Windows GUI  Coexists with other Operating Systems  Runs on multiple platforms  Includes the Source Code
  • 8. Component of Linux 8  The Linux Kernel  Libraries  Utilities  User Interface
  • 10. Linux Kernel 10 Libraries are pre-written code “pieces” that application programmers use in their programs. Utilities maintaining the file system, editing text files, managing running processes, and installing new software packages. User Interface command-line interface (CLI) and a graphical user interface (GUI).
  • 11. Kernel Space and User Space 11  The Concept of kernel space and user space is all about memory and access rights.  It is a feature of modern CPU, allowing it to operate either in privileged or unprivileged mode.  One ,may consider kernel to be privileged and user apps are restricted.
  • 12. Kernel Space and User Space 12
  • 13. Linux Filesystem Hierarchy 13  The Linux File Hierarchy Structure or the Filesystem 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.
  • 15. Linux Filesystem Hierarchy 15  / (root) • Primary hierarchy root and is the first directory and the root directory of the entire file system hierarchy. • It contains all other directories i.e. the sub directories. • Only the root user has the permissions to write here. • This is not the home directory for the root user  /bin (user binaries) • It contains binary executables. • Binary executables of common linux commands used by all users in single-user mode are located in this directory. • Some files present in this directory are: ls, cp, grep, ping, cat, etc.
  • 16. Linux Filesystem Hierarchy 16  /boot (boot loader files) • It contains boot loader files. • kernel, initrd, grub, and other files and directories are located in this directory. • e.g. vmlinux-2.7.31.25-generic, initrd.img-2.3.32.24-generic, etc.  /dev (device files) • It contains the essential files related to the devices attached to the system. • This includes terminal devices, USB, network devices and any other devices that are attached to the system. • e.g. /dev/usbmon0 , /dev/tty1 , /dev/null , etc.
  • 17. Linux Filesystem Hierarchy 17  /etc (configuration files) • etc stands for ‘edit to config’ • This directory contains the configuration files that are required by the installed programs. • The files are host-specific and system-wide configurations needed for the proper functioning of the system. • This directory also contains shell scripts for system startup and system shutdown that are used to start or stop individual programs. • The files in this directory should not be edited without proper knowledge of system configuration as improper configuration could brick the system. • e.g. /etc/passwd , /etc/shadow , /etc/group , /etc/resolv.conf , etc.
  • 18. Linux Filesystem Hierarchy 18  /home (home directories) • This directory contains user’s home directories, containing saved files and personal settings. • Each user will have an separate directory with their username under this directory except the root user because every time a new user is created, a directory is created in the name of the user within the home directory. • e.g. /home/user , /home/sage , /home/guest , etc.  /lib (system libraries) • This directory contains libraries that are essential for the binaries in /bin and /sbin • Library filenames are either ld* or lib*.so.* • e.g. ld-2.11.1.so , etc.  /media (removable media devices) • Temporary mount directory for removable media such as CD-ROM. • e.g. /media/cdrom for CD-ROM ; /media/floppy for floppy drives ; /media/cdrecorder for CD writer ; etc.
  • 19. Linux Filesystem Hierarchy 19  /mnt (mount directory) • Temporary mount directory where system administrator can mount file systems.  /opt (optional application software packages) • This directory contains add-on applications from individual vendors.  /proc (process information) • This is a virtual filesystem providing process and kernel information. This files in this directory are automatically generated, populated and deleted by the system. In Linux, corresponds to a procfs mount. • This directory contains information about the processes running in the system. • This directory also contains text information about running processes. e.g. /proc/uptime • e.g. /proc/{pid} directory contains information about the process with that particular pid that will be mentioned within the brackets.
  • 20. Linux Filesystem Hierarchy 20  /root (root directory) • This is the home directory for the root user.  /sbin (system binaries) • This directory contains essential system binaries. • The linux commands that are located in this directory are used by system administrator, for system maintenance and configuration purpose. e.g. fsck , reboot , fdisk , ifconfig , init , etc.
  • 21. Linux Filesystem Hierarchy 21  /root (root directory) • This is the home directory for the root user.  /sbin (system binaries) • This directory contains essential system binaries. • The linux commands that are located in this directory are used by system administrator, for system maintenance and configuration purpose. e.g. fsck , reboot , fdisk , ifconfig , init , etc.  /srv (service data) • This directory contains site-specific data served by the system, such as data and scripts for web servers, data offered by FTP servers, and repositories for version control systems i.e. server specific services related data. e.g. /srv/cvs contains CVS related data , etc.
  • 22. Linux Filesystem Hierarchy 22  /sys (system) • This directory contains information about devices, drivers, and some kernel features.  /tmp (temporary files) • This directory contains temporary files created by system and the users that will be rebooted when the system is rebooted.  /usr (user programs) • This directory contains read-only user data like binaries, libraries, documentation and source-code for second level programs like user utilities and applications. • /usr/bin → contains binary files for user programs. If you can’t find a user binary under /bin, then we should look under /usr/bin. • /usr/include → contains standard include files.
  • 23. Linux Filesystem Hierarchy 23 • /usr/lib → contains libraries for the binaries in /usr/bin and /usr/sbin • /usr/local → tertiary hierarchy for local data. contains users programs that you install from source. e.g., when you install apache, it goes under /usr/local/apache2 • /usr/sbin → /usr/sbin contains binary files for system administrators. If you can’t find a system binary under /sbin, then you should look under /usr/sbin. It also contains non- essential system binaries. e.g. daemons for network-services.  /var (variable files) • This directory contains files whose content is expected to continually change during normal operation of the system—such as logs, spool files, and temporary e-mail file. • /var/log → contains system log files.

Editor's Notes