SlideShare a Scribd company logo
1 of 35
Download to read offline
‫آموزش‬ ‫دپارتمان‬
‫لینوکس‬ ‫آموزش‬
GNU/Linux Filesystem
Mohammad Reza Gerami
mrgerami@aut.ac.ir
gerami@aryatadbir.com
3
What We Will Learn
Introduction
Filesystem Hierarchy Standard
Directory layout of Linux FS
Help
Mounting
4
Introduction
 Filesystem
 How are data stored in storage?
 How do users access the data?
 Data organization, files and directories
 Filesystem types
 Disk FS: ext2, ext3, FAT, FAT32 & NTFS
 Network FS: Samba & NFS
 Flash FS: JFFS2
 Special FS: proc FS
5
Introduction (cont’d)
 You should understand Linux FS
 Why?
 Everything in Linux is file, if it is NOT process
 Easy to use
 Open file, read/write and close the file
 Unlike Windows, Linux FS is standard FS
 Everyone should learn standards
6
Filesystem Hierarchy Standard
 Started by Dennis Ritchie, 1993
 Defines the main directories and their contents in
most Linux-based systems
 Current Version: 2.3.
7
FHS
 There is not any drive C:, D:, …
 All directories are under “/”
 “/” is the root directory
 It is possible
 to have multiple partitions
 to multiple filesystems
8
The “/”
 The primary hierarchy in FSH
 The root of tree of filesystem
 All paths start form here
 There is only one “/” in filesystem
9
The “/”
/
boot bin dev etc lib proc root sbin tmp usr var
10
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
 Essential programs
 Need for system startup
 Basic commands for
 Navigating in filesystem
 File management
13
bin
bin
bash bzip2 cat gzip ls mv rm...
14
dev
 Everything is file
 Hardware components (devices) are file
 Hard disk
 Key board
 All device files are here
 Direct interaction with device driver
 Open the device file
 Read & Write
15
dev
dev
hda fda sda tty random null...
16
etc
 System configuration directory
 What is done by the registry in Windows
 All configuration file are text files
 You can view and edit it manually
17
etc
etc
bashrc fstab inittab passwd shadow X11
X11.conf
init.d
network named httpd
18
home
 Home directory of user
 Each user has a directory
 /home/bahador
 /home/hamed
 All files of user are stored here
19
lib
 Programs need libraries
 Dynamically linked libraries
 Programmers need libraries
 All essential libraries are here
 Needed for system startup
20
lib
lib
libc libm libcrypt libpthread modules
21
proc
 Kernel’s interface
 Kernel pseudo-directory
 Special directory
 It is NOT a directory on hard disk
 Kernel Configuration
 Kernel State monitoring
22
proc
proc
cpuinfo meminfo devices interrupts net sys
tcp udp kernelnet
1 129
23
root
 Home directory of root
 Don’t confuse
 / is the “root of Filesystem”
 root is the name of system admin
 /root is the admin
24
sbin
 System configuration programs
 Format hard disk
 Manage hardware
 Only “root” can run the programs
25
sbin
sbin
fsck mkfs mount adduser poweroff...
26
tmp
 Temporary directory
 All temp files are created by programs
 Your temp files
 It is emptied regularly
27
usr
 Secondary hierarchy
 Very useful programs
 We usually use them
 compiler, tools
 Are not essential for system startup
28
usr
usr
bin doc include lib local sbin src
Linux-2.6.14
29
var
 The variable directory
 All dynamic files
 User cannot change the files
30
var
var
cache lib lock log www named
message boot.log
31
Helps
 Some documents are in /usr/share/doc
 Info pages are not complete help
 info <command name>
 Man pages
 /usr/share/man
 man1: user commands, man8: System administration
 man <command name>
32
Permissions
 There are 3 basic permissions
 Read (r)
 Write (w)
 Execute (x)
 How to find them
 ls -l
 How to change them
 chmod +/- r/w/x <filename>
33
Mounting
 Mount
 To add a filesystem to other filesystem
 Add you cool-disk FS to you laptop FS
 How?
 mount <options> <device> <mount point>
 mount -t vfat /dev/sdb1 /mnt/flash
 Don’t forget the umount
 umount <mount point>
 umount /mnt/flash
34
Linux FS vs. Windows FS
 There is not drive C:, D:
 Top hierarchy is /
 Path separator is / not 
 File extensions have NOT any meaning
 There is not hidden attribute, hidden files are
started by .
35
edu@aryatadbir.com
‫آموزش‬ ‫واحد‬ ‫با‬ ‫تماس‬

More Related Content

What's hot

UNIX(Essential needs of administration)
UNIX(Essential needs of administration)UNIX(Essential needs of administration)
UNIX(Essential needs of administration)Papu Kumar
 
Disk operating system
Disk operating systemDisk operating system
Disk operating systemRaza Jaan
 
Basic dos-commands
Basic dos-commandsBasic dos-commands
Basic dos-commandsparag dhok
 
DOS - Disk Operating System
DOS - Disk Operating SystemDOS - Disk Operating System
DOS - Disk Operating SystemMeqdad Darweesh
 
Lect basic computer
Lect basic computer Lect basic computer
Lect basic computer susir
 
101 4.3 control mounting and unmounting of filesystems
101 4.3 control mounting and unmounting of filesystems101 4.3 control mounting and unmounting of filesystems
101 4.3 control mounting and unmounting of filesystemsAcácio Oliveira
 
The evolution of linux file system
The evolution of linux file systemThe evolution of linux file system
The evolution of linux file systemGang He
 
Disk Operating System ( D O S)
Disk  Operating  System ( D O S)Disk  Operating  System ( D O S)
Disk Operating System ( D O S)MihalR
 
CMD Command prompts
CMD Command promptsCMD Command prompts
CMD Command promptsAhmed Hesham
 
101 4.7 find system files and place files in the correct location
101 4.7 find system files and place files in the correct location101 4.7 find system files and place files in the correct location
101 4.7 find system files and place files in the correct locationAcácio Oliveira
 
File system.
File system.File system.
File system.elyza12
 

What's hot (20)

File system
File systemFile system
File system
 
UNIX(Essential needs of administration)
UNIX(Essential needs of administration)UNIX(Essential needs of administration)
UNIX(Essential needs of administration)
 
Disk operating system
Disk operating systemDisk operating system
Disk operating system
 
Ms DOS
Ms DOSMs DOS
Ms DOS
 
Ext filesystem4
Ext filesystem4Ext filesystem4
Ext filesystem4
 
Basic dos-commands
Basic dos-commandsBasic dos-commands
Basic dos-commands
 
DOS - Disk Operating System
DOS - Disk Operating SystemDOS - Disk Operating System
DOS - Disk Operating System
 
Ubuntu File System
Ubuntu File SystemUbuntu File System
Ubuntu File System
 
Lect basic computer
Lect basic computer Lect basic computer
Lect basic computer
 
101 4.3 control mounting and unmounting of filesystems
101 4.3 control mounting and unmounting of filesystems101 4.3 control mounting and unmounting of filesystems
101 4.3 control mounting and unmounting of filesystems
 
The evolution of linux file system
The evolution of linux file systemThe evolution of linux file system
The evolution of linux file system
 
Disk Operating System ( D O S)
Disk  Operating  System ( D O S)Disk  Operating  System ( D O S)
Disk Operating System ( D O S)
 
CMD Command prompts
CMD Command promptsCMD Command prompts
CMD Command prompts
 
Ms dos
Ms dosMs dos
Ms dos
 
Linux training
Linux trainingLinux training
Linux training
 
101 4.7 find system files and place files in the correct location
101 4.7 find system files and place files in the correct location101 4.7 find system files and place files in the correct location
101 4.7 find system files and place files in the correct location
 
Dos commands
Dos commandsDos commands
Dos commands
 
File system.
File system.File system.
File system.
 
Linux lecture5
Linux lecture5Linux lecture5
Linux lecture5
 
Introduction to ms dos
Introduction to ms dosIntroduction to ms dos
Introduction to ms dos
 

Similar to Linux file system

Similar to Linux file system (20)

Linux file system
Linux file systemLinux file system
Linux file system
 
linuxfilesystem-180727181106 (1).pdf
linuxfilesystem-180727181106 (1).pdflinuxfilesystem-180727181106 (1).pdf
linuxfilesystem-180727181106 (1).pdf
 
beginner.en.print
beginner.en.printbeginner.en.print
beginner.en.print
 
beginner.en.print
beginner.en.printbeginner.en.print
beginner.en.print
 
beginner.en.print
beginner.en.printbeginner.en.print
beginner.en.print
 
Linux basics
Linux basics Linux basics
Linux basics
 
Linux basics
Linux basics Linux basics
Linux basics
 
Lesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File SystemLesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File System
 
Module 3 Using Linux Softwares.
Module 3 Using Linux Softwares.Module 3 Using Linux Softwares.
Module 3 Using Linux Softwares.
 
Linux Getting Started
Linux Getting StartedLinux Getting Started
Linux Getting Started
 
Linux Presentation
Linux PresentationLinux Presentation
Linux Presentation
 
Tutorial 2
Tutorial 2Tutorial 2
Tutorial 2
 
File system discovery
File system discovery File system discovery
File system discovery
 
Linux filesystemhierarchy
Linux filesystemhierarchyLinux filesystemhierarchy
Linux filesystemhierarchy
 
Ch1 linux basics
Ch1 linux basicsCh1 linux basics
Ch1 linux basics
 
Linux booting process - Linux System Administration
Linux booting process - Linux System AdministrationLinux booting process - Linux System Administration
Linux booting process - Linux System Administration
 
Linux introduction (eng)
Linux introduction (eng)Linux introduction (eng)
Linux introduction (eng)
 
File system hiearchy
File system hiearchyFile system hiearchy
File system hiearchy
 
Linux
LinuxLinux
Linux
 
Linux Commands
Linux CommandsLinux Commands
Linux Commands
 

More from Mohammad Reza Gerami (8)

Security for distributed systems
Security for distributed systemsSecurity for distributed systems
Security for distributed systems
 
Distributed systems
Distributed systemsDistributed systems
Distributed systems
 
Hpc4 linux advanced
Hpc4 linux advancedHpc4 linux advanced
Hpc4 linux advanced
 
Linux installation
Linux installationLinux installation
Linux installation
 
Introducing to linux
Introducing to linuxIntroducing to linux
Introducing to linux
 
Linux History
Linux HistoryLinux History
Linux History
 
Big data
Big dataBig data
Big data
 
Big Data - Gerami
Big Data - GeramiBig Data - Gerami
Big Data - Gerami
 

Recently uploaded

Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 

Recently uploaded (20)

Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 

Linux file system