Your SlideShare is downloading. ×
0
07 qlx02vtour
07 qlx02vtour
07 qlx02vtour
07 qlx02vtour
07 qlx02vtour
07 qlx02vtour
07 qlx02vtour
07 qlx02vtour
07 qlx02vtour
07 qlx02vtour
07 qlx02vtour
07 qlx02vtour
07 qlx02vtour
07 qlx02vtour
07 qlx02vtour
07 qlx02vtour
07 qlx02vtour
07 qlx02vtour
07 qlx02vtour
07 qlx02vtour
07 qlx02vtour
07 qlx02vtour
07 qlx02vtour
07 qlx02vtour
07 qlx02vtour
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

07 qlx02vtour

63

Published on

LINUX

LINUX

Published in: Education, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
63
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Unit 7 A Tour through Linux
  • 2. Objectives After completing this unit, you should be able to: • Describe the structure of the filesystem • Mount and unmount CD-ROMs and floppy disks
  • 3. Directory Structure •All Linux directories are contained in one, virtual, "unified filesystem" • Physical devices are mounted on mount points • FLOPPY DISKS • HARD DISK PARTITIONS • CD-ROM drives • No drive letters like A:, C:, ... boo t et c li b 1 1 I I I I I I bin dev home mnt root tmp var pro c sbi n us r LOST+FOU ND /
  • 4. /BIN, /LIB, / SBIN boo t et c li b 1 1 I I I I I I bin dev home mnt root tmp var pro c sbi n us r LOST+FOU ND / •/BIN CONTAINS EXECUTABLES FOR EVERY USER •/SBIN CONTAINS SYSTEM ADMINISTRATION EXECUTABLES •/LIB CONTAINS LIBRARIES • Should always be available -At system boot -In single user mode -When booting from rescue disk
  • 5. /BOOT boo t et c li b 1 1 I I I I I I bin dev home mnt root tmp var pro c sbi n us r LOST+FOU ND / • Contains kernel image and some other goodies
  • 6. /DEV boo t et c li b 1 1 I I I I I I bin dev home mnt root tmp var pro c sbi n us r LOST+FOU ND / • Contains special files that represent hardware devices - Block special device, for example, a hard disk - Character special device, for example, mouse and keyboard • Each device has a major and minor number - Identification within the kernel
  • 7. /ETC boo t et c li b 1 1 1 1 1 1 1 I bin dev home mnt root tmp var pro c sbi n us r LOST+FOU ND / • Contains system-wide configuration files • Some subsystems have multiple files and therefore use a separate directory -/ETC/X11 CONTAINS X WINDOW SYSTEM CONFIGURATION -/ETC/SKEL CONTAINS DEFAULT USER CONFIGURATION FILES -/ETC/SYSCONFIG CONTAINS SYSTEM CONFIGURATION
  • 8. /HOME boo t et c li b 1 1 I I I I I I bin dev home mnt root tmp var pro c sbi n us r LOST+FOU ND fred bill JANE / • Home directories of users
  • 9. /MNT boo t et c li b floppy 1 1 I I I I I I bin dev home mnt root tmp var pro c sbi n us r LOST+FOU ND cdrom 1 win95 / • Mount points for other filesystems • Note: SUSE uses /media instead of /mnt for floppy and cdrom mountpoints
  • 10. /PROC boo t et c li b 1 1 I I I I I I bin dev home mnt root tmp var pro c sbi n us r LOST+FOU ND / •Virtual filesystem • Represents kernel and process information
  • 11. /ROOT boo t et c li b 1 1 1 1 1 1 1 I bin dev home mnt root tmp var pro c sbi n us r lost+foun d / • Home directory of the root user
  • 12. /TMP boo t et c li b 1 1 1 1 1 1 1 I bin dev home mnt root tmp var pro c sbi n us r LOST+FOU ND / •Temporary storage space for programs, users • Usually automatic cleanup mechanism active
  • 13. /USR boo t et c li b 1 1 I I I I I I bin dev home mnt root tmp var pro c sbi n us r LOST+FOU ND bin lib 1 sbin»UNIX SYSTEM RESOURCES ► CONTAINS ALL PROGRAMS, LIBRARIES AND SO ON WHICH ARE NOT ESSENTIAL FOR SYSTEM BOOT AND EMERGENCY OPERATIONS ►/USR/LOCAL INTENDED FOR PROGRAMS NOT IN THE DISTRIBUTION -LOCALLY DEVELOPED -LOCALLY COMPILED /
  • 14. /VAR 1 1 1 1 1 1 1 I bin dev home mnt root tmp var boot etc lib proc sbin usr LOST+FOU ND X• Files of variable size -logfiles -lockfiles • Directories with variable content -mail -scheduling -printing •Temporary storage space, longer than /tmp tmp spool log 1 /
  • 15. /LOST+FOUND boo t et c li b 1 1 1 1 1 1 1 1 bin dev home mnt root tmp var pro c sbi n us r lost+foun d / • Exists in every filesystem • Place where lost+found files are stored after a crash recovery by fsck.
  • 16. Other Directories in / boo t et c li b 1 1 1 1 1 1 1 I bin dev home mnt root tmp var pro c sbi n us r lost+foun d / •/OPT: USED FOR SOME SOFTWARE FROM EXTERNAL PROVIDERS -SEPARATE FILESYSTEM ADVISABLE •Whatever you create yourself.
  • 17. Virtual, Unified Filesystem • Linux does not use drive letters (A:, C:, D:) to identify drives/partitions, but creates a virtual, unified filesystem • Different drivers/partitions are "mounted" on a "mountpoint" /DEV/HDA2 IS THE "ROOT FILESYSTEM" bin lib sbin tmp spool log- this directory is now called /var/log /DEV/HDA5 IS /DEV/HDA6 IS "mounted" on /usr "mounted" on /var
  • 18. Typical Filesystem Layout Typical Workstation: Typical Server:
  • 19. The mount Command •The mount command mounts a filesystem • Makes it part of the unified filesystem structure mount [-t type] [-o opts] device mountpnt # MOUNT /DEV/HDA5 /USR
  • 20. The umount Command •The umount command unmounts a filesystem •Takes it out of the unified filesystem structure • Filesystem should not be busy umount {device|mountpnt} # umount /DEV/HDA5 - OR - # umount /USR
  • 21. The /etc/fstab File •/ETC/FSTAB lists all known filesystems on the system • Syntax: device mountpoint type options dump fsck • Filesystems with the noauto option are not mounted automatically but can be used as templates for mount # cat /etc/fstab /DEV/HDA1 /MNT/WIN95 vfat defaults 0 0 /DEV/HDA2 / ext3 defaults 1 1 /DEV/HDA5 /usr ext3 defaults 1 2 /DEV/HDA6 /VAR ext3 defaults 1 2 /DEV/CDROM /MNT/CDROM iso9660 noauto,owner,ro 0 0 /DEV/FD0 /MNT/FLOPPY auto noauto,owner 0 0 none /proc proc defaults 0 0 none /DEV/PTS devpts gid=5,mode=620 0 0 Note: Some distributions use filesystem labels instead of device names!
  • 22. Mounting and Unmounting Removable Media • Most distributions configure /etc/fstab so that the console user is allowed to mount removable media (floppy, cd) on a predetermined mountpoint and with predetermined options (for security) •Always unmount media before ejecting! •The GUI typically offers icons that perform the mount $ whoami tux1 $ mount /mnt/cdrom $ mount /DEV/CDROM ON /MNT/CDROM TYPE $ LS /MNT/CDROM iso9660 (ro,nosuid,nodev,user=tux1) $ umount /mnt/cdrom
  • 23. Checkpoint T/F 1. Linux uses drive letters (A:, B:, C: and so forth), just like Windows. 2. The best location for the mount command would be a. /etc b. /bin c. /sbin d. /usr/sbin 3. Where are most system-wide configuration files stored?
  • 24. Unit Summary • Structure of the filesystem /BIN, /LIB, /SBIN /BOOT /ETC /HOME, /ROOT /TMP /USR /VAR • Special filesystems /PROC /MNT • Special files /dev

×