Vous êtes sur la page 1sur 14

Linux File System

Presented by
Aphirak Jansang

11/08/09 1
File System
 File System is developed for
 create/store/load/delete/seek file on media
 Media example
 Magnetic Media
 Tape
 Floppy disk
 Hard disk
 Optical Media
 Cdrom
 Dvd

11/08/09 2
File System of OS
 File system of Windows OS
 Windows 98 and Windows ME
 Support FAT16, FAT32
 Windows 2000

Support FAT16,FAT32, NTFS
 Windows XP

Support FAT32, NTFS
 File system of BSD Family OS
 FFS (Fast File System)

11/08/09 3
File System in Linux
 File System in Linux is divided into 2 type
 Linux Swap
 is used in virtual memory system
 Linux File System
 is used to store file
 there is various type of file system
 ext2 ( is first introduced in kernel 2.0.x )
 reiserfs ( is first introduced in kernel 2.2.x )
 ext3 ( is first introduced in kernel 2.4.x )

11/08/09 4
Different between Linux
and Windows File System

Characteristic Windows Linux


File System NTFS, FAT ext2,ext3

Reference Root of Each partition will Each partitions is


each partition point be own root mounted under /
Ex. C:, D:, F:

11/08/09 5
Linux File System Layout
 / - first of mount point in linux
 /etc - keep linux default configuration
 /boot - keep important linux booting files
 /dev - keep all device files
 /usr - keep all user binary and X library
 /home - keep user home directory
 /proc - is pseudo file system for tracking running
process and state of linux system
 /var - keeping mail, log file and printer spooling
 /lib - contain shared library that is required by
system program
 /tmp - contain system temporary file

11/08/09 6
How Linux mount this
layout?
/ hda3

hda1 /var /home hda4

 Using mount command


 mount –t type device target-dir
 type ex. ext2, ext3, reiserfs, …
 device ex. /dev/hda1, /dev/hdb1, …
 target-dir ex. /, /var, /home, /mnt/cdrom, …

11/08/09 7
How to use mount
command?
/ hda3, ext2

hda1,ext2 /var /home hda4,ext2

 mount command example


 mount –t ext2 /dev/hda3 /
 mount –t ext2 /dev/hda4 /home
 mount –t ext2 /dev/hda1 /var

11/08/09 8
How can we check current
mounted partition?
 Check current mounted by using
mount command without parameter
 Example result for checking current
mounted partition

11/08/09 9
How to use un-mount
partition?

 umount is used to un-mount partition


 umount directory
 umount device
 Example
 umount /var
Or
 umount /hda1

11/08/09 10
Where is linux store list of
mounting partition when
booting ?
 It is locate in /etc/fstab file
 Example of fstab file

11/08/09 11
How can we add new
mount partition entry in
/etc/fstab?
 Assume – we would like to add windows
partition (hdb1, FAT32) that linux have to
mount at boot time at /mnt/windows
 file system = /dev/hdb1
 mount point = /mnt/window
 type = vfat
 Options = defaults
 Dump = 0
 Pass = 1

11/08/09 12
How can we add new
mount partition entry in
/etc/fstab?
 From the previous information, we have to add
following line in /etc/fstab files
/dev/hba1 /mnt/windows vfat defaults 0 0

11/08/09 13
Conclusion
 Linux File System
 ext3 file system
 ext2 file system
 …
 Mount/Un-mount command
 mount –t type device target-dir
 umount device | umount target-dir
 Linux System mount configuration file
 /etc/fstab

11/08/09 14

Vous aimerez peut-être aussi