Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Course 102: Lecture 2: Unwrapping Linux

630 views

Published on

This lecture covers the structure of the Linux filesystem layout and the concept of mounting different filesystems in the main filesystem


Check the other Lectures and courses in
http://Linux4EnbeddedSystems.com

or Follow our Facebook Group at
- Facebook: @LinuxforEmbeddedSystems

Lecturer Profile:
- https://www.linkedin.com/in/ahmedelarabawy

Published in: Technology
  • Be the first to comment

Course 102: Lecture 2: Unwrapping Linux

  1. 1. Linux For Embedded Systems ForArabs Ahmed ElArabawy Course 102: UnderstandingLinux
  2. 2. Lecture 2: Unwrapping Linux
  3. 3. File System Layout (Windows)
  4. 4. File System Layout (Windows)
  5. 5. File System Layout (Linux)
  6. 6. File System Layout (Linux)
  7. 7. Mounting Devices
  8. 8. Choosing The Mounting Point
  9. 9. Choosing The Mounting Point
  10. 10. Choosing The Mounting Point
  11. 11. Choosing The Mounting Point
  12. 12. Linux File-System Layout A major difference Between Windows and Linux in file structure • In Windows, • Each partition of drive will have its own separate tree.. (C, D, E,…) • Plugging a flash or a portable hard-disk results in a new tree • In Linux, • We have a single tree (unified file-system) • The head of the tree is called the root ‘/’ • Plugging a device will add a branch (or sub-tree) to the file- system … at the selected mounting point
  13. 13. Linux File-System Hierarchy
  14. 14. Linux File-System Hierarchy Directory Role / Root Directory, the head of the tree /home/ Contains the home directories of users /home/aelarabawy (my home directory) Each user can put his files under his home directory /root/ The home directory for the super user (admin) /usr/ Files (programs, libraries, documentation, etc..) used by all users in the system Examples: /usr/bin/ binaries used by all users binaries included with the distribution /usr/local/ files that don’t come with the distribution and installed by the user /usr/sbin/ system files that come with the distribution /usr/share/ shared data by programs in /usr/bin/
  15. 15. Linux File-System Hierarchy Directory Role /boot/ Boot loader, Linux Kernel, Startup files Examples: /boot/vmlinuz/ Linux kernel image /boot/grup/grup.conf Bootloader configuration file /boot/initrd/ Startup Files used in booting /bin/ Common programs, shared by the system, the system administrator and the users /sbin/ System binaries Programs for use by the system and the system admin /lib/ Shared libraries /opt/ Optional software; Extra and third party software
  16. 16. Linux File-System Hierarchy Directory Role /dev/ Device nodes; not a regular file Each device in the system is represented by a file, so to write to the device, we write to this file, to read from a device, we read from this file /etc/ System configuration files (similar to those in the Control Panel in Windows) Examples: /etc/fstab contains a list of storage devices and their associated mount point /etc/passwd contains list of user accounts /var/ Storage for variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it. Examples: /var/log log files /var/log/messages system log file
  17. 17. Linux File-System Hierarchy Directory Role /net/ Standard mount point for entire remote file systems /media/ contains the mount points of removable media devices such as CD-ROMs and USBs (that are mounted automatically) /mnt/ Standard mount point for external file systems, e.g. a CD- ROM or a digital camera. /proc/ Does not contain stored files, it is just the front of some devices feedback (reading from it, is like asking a driver to provide information ) Used to read information about system resources. /sys/ Same as /proc/ /tmp/ Temporary space for use by the system, cleaned upon reboot, so don't use this for saving any work! /lost+found/ For Every disk partition, contains files that were saved during failures are here.
  18. 18. http://Linux4EmbeddedSystems.com

×