Linux Filesystem Hierarchy The Linux Documentation Project.

Slides:



Advertisements
Similar presentations
POS/420 Philip Robbins – March 19, 2013 (Week 2) University of Phoenix Mililani Campus Introduction to Unix.
Advertisements

Basic Unix system administration
Linux Booting Procedure
Linux can be generally divided into four major components: 1. KERNEL – OS, ultimate boss The kernel is the core program that runs programs and manages.
Linux+ Guide to Linux Certification, Second Edition
A Guide to Unix Using Linux Fourth Edition
5 Basic utilities When a user logs in to the Linux operating system the directory that they will start in is their home directory. Most users will have.
Introduction to Unix (CA263) File System
Exploring the UNIX File System and File Security
Linux+ Guide to Linux Certification, Second Edition Chapter 3 Linux Installation and Usage.
Linux Intro Linux, the do it yourself OS Linux, successor to MINIX Linux, Unix for the masses (PC users) History:
GNU/Linux Filesystem 1 st AUT GNU/Linux Festival Computer Engineering & IT Department Bahador Bakhshi.
Lesson 22 – Introduction to Linux Systems Administration.
Linux Linux File System.
Guide To UNIX Using Linux Third Edition
File System and Directory Structure in Linux. What is File System In a computer, a file system is the way in which files are named and where they are.
Linux Filesystem Management
Guide To UNIX Using Linux Fourth Edition
Linux Installation and Administration – Lesson 5 Tutor: George Papamarkos Topic: Devices in Linux.
The file structure and related utilities CS240 Computer Science II.
Manage Directories and Files in Linux
Chapter 9 Part II Linux Command Line Access to Linux Authenticated login using a Linux account is required to access a Linux system. The Linux prompt will.
Guide to Linux Installation and Administration, 2e1 Chapter 8 Basic Administration Tasks.
Unix Basics Chapter 4.
1 Web Server Administration Chapter 3 Installing the Server.
Chapter 6: Linux Filesystem Administration
Chapter Two Exploring the UNIX File System and File Security.
INTRODUCTION TO LINUX Jacob Chan. GNU/Linux Consists of Linux kernel, GNU utilities, and open source and commercial applications Works like Unix –Multi-user.
Linux Administration. Pre-Install Different distributions –Redhat, Caldera, mandrake, SuSE, FreeBSD Redhat Server Install –Check HCL –Significant issues.
UNIX File System by Tero Toikkanen, CAP02S. UNIX Multi-user system Multi-user system Multi-tasking system Multi-tasking system Wide selection of tools.
Manage Directories and Files in Linux. 2 Objectives Understand the Filesystem Hierarchy Standard (FHS) Identify File Types in the Linux System Change.
Chapter Two Exploring the UNIX File System and File Security.
ITR3 lecture 6: intoduction to UNIX Thomas Krichel
E X C E E D I N G E X P E C T A T I O N S Basic LINUX Linux System Administration Dr. Hoganson Kennesaw State University Operating Systems Directory structure:
1 © 2001 John Urrutia. All rights reserved. Chapter 4 The LINUX Filesystem.
Introduction to Programming Using C An Introduction to Operating Systems.
System Administration – Part 2. Devices in UNIX are files: A device can be accessed with different file names All device files are stored in /dev or its.
Manage Directories and Files in Linux Part 2. 2 Identify File Types in the Linux System The file types in Linux referred to as normal files and directories.
Linux Commands C151 Multi-User Operating Systems.
PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Workshop V Files and the File System Part B – File System.
Linux Filesystem WeeSan Lee. Roadmap Disk Partitions The Filesystem Filesystem Mouting & Umounting File Tree File Type File Permission.
Chapter 10: File-System Interface Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 1, 2005 File-System Interface.
CS 245 – Part 1 Using Operating Systems and Networks for Programmers Jiang Guo Dept. of Computer Science California State University Los Angeles.
SUSE Linux Enterprise Desktop Administration Chapter 7 Manage Directories and Files.
UNIX filesystem CS 2204 Class meeting 2 *Notes by Doug Bowman and other members of the CS faculty at Virginia Tech. Copyright
Lecture 02 File and File system. Topics Describe the layout of a Linux file system Display and set paths Describe the most important files, including.
The Kernel At a high level, the kernel in an operating system serves as the bridge between applications and the actual data processing of the hardware.
A Brief Overview of Unix Brandon Bohrer. Topics What is Unix? – Quick introduction Documentation – Where to get it, how to use it Text Editors – Know.
1 CS3695 – Network Vulnerability Assessment & Risk Mitigation – Introduction to Unix & Linux.
Embedded Software Design Week II Linux Intro Linux Kernel.
LINUX Zhengli Zhu, School of Life Sciences. Outline 1. ABC of Linux 2. Basic orers of Linux 3. Bash Programming.
ORAFACT The Linux File System. ORAFACT Filesystem Support Support for dozens of filesystem types including: Minix, ext2, MS-DOS, UMSDOS, VFAT, NTFS, NFS,
Memory management. Linux Memory Management Total memory available for processes = real memory + paging space - 1MB. First megabyte of real memory is used.
Linux Filesystem Administration
Linux Administration – Finding You Way on the Command Line The Linux File Directory or Tree.
BILKENT UNIVERSITY DEPARTMENT OF COMPUTER TECHNOLOGY AND INFORMATION SYSTEMS CTIS156 INFORMATION TECHNOLOGIES II FILES AND FILE SYSTEM STRUCTURE.
Getting Started with Linux
Filesystem Hierarchy Operating systems I800
Linux 101 Training Module Linux Basics.
UBUNTU INSTALLATION
Chapter 6 File Systems CSNB113 SYSTEM ADMINISTRATION
Basic Commands ls cp ls –l (in detail format) echo ls –a
C151 Multi-User Operating Systems
Exploring the UNIX File System and File Security
Unix : Introduction and Commands
Chapter 7 File and file System structure
Devices, Linux Filesystems,and the Filesystem Hirarchy standard
Linux Filesystem Management
Chapter 4: The Linux Filesystem
January 26th, 2004 Class Meeting 2
Presentation transcript:

Linux Filesystem Hierarchy The Linux Documentation Project

2 The Root Directory /bin /boot /dev /etc /home /initrd /lib /lost+found /media /mnt /opt /proc /root /sbin /usr /srv /tmp /var

3 1. /bin Contains several useful commands that are of use to both the system administrator as well as non-privileged users. Usually contains the shells like bash, csh, etc.... and commonly used commands like cp, mv, rm, cat, ls. Also contains programs which boot scripts may depend on There are no (real) subdirectories in /bin

4 1. /bin …(cont) cat chgrp chmod chown cp date dd df dmesg echo false rm rmdir sed sh stty su sync true umount uname hostname kill ln login ls mkdir mknod more mount mv ps pwd

5 1. /bin detail cat chgrp chmod chown cp date dd df dmesg echo false → Utility to concatenate files to standard output → Utility to change file group ownership → Utility to change file access permissions → Utility to change file owner and group → Utility to copy files and directories → Utility to print or set the system data and time → Utility to convert and copy a file → Utility to report filesystem disk space usage → Utility to print or control the kernel message buffer → Utility to display a line of text → Utility to do nothing, unsuccessfully

6 1. /bin detail (cont) hostname kill ln login ls mkdir mknod more mount mv ps → Utility to show or set the system's host name → Utility to send signals to processes → Utility to make links between files → Utility to begin a session on the system → Utility to list directory contents → Utility to make directories → Utility to make block or character special files → Utility to page through text → Utility to mount a filesystem → Utility to move/rename files → Utility to report process status

7 1. /bin detail (cont) pwd rm rmdir sed sh stty su sync true umount uname → Utility to print name of current working directory → Utility to remove files or directories → Utility to remove empty directories → The `sed' stream editor → The Bourne command shell → Utility to change and print terminal line settings → Utility to change user ID → Utility to flush filesystem buffers → Utility to do nothing, successfully → Utility to unmount file systems → Utility to print system information

8 2. /boot Contains everything required for the boot process except for configuration files not needed at boot time and the map installer Stores data that is used before the kernel begins executing user-mode programs May include the system kernel (under symbolically linked)

9 2. /boot … detail /boot/boot.0300 /boot/boot.b /boot/chain.b /boot/config-kernel- version /boot/map /boot/vmlinuz /boot/vmlinuz-kernel- version … → Backup master boot record. → The basic boot sector → Used to boot non-Linux operating systems → Installed kernel configuration. A config line such as:CONFIG_FONT_8x8=y → The location of the kernel → Normally the kernel or symbolic link to the kernel

10 3. /dev Usualy is the location of device files A device and a file both can be read from and written to. So config a device is same with edit a file. EX: sending data to /dev/ttyS0 that means you are sending data to a communication device, such as a modem. 'block devices' are devices that store or hold data 'character devices' can be thought of as devices that transmit or transfer data

11 3. /dev … detail /dev/ttyS0 /dev/psaux /dev/lp0 /dev/dsp /dev/usb /dev/sda /dev/scd /dev/cdrom /dev/fd0 /dev/had → Device connected to Com1 (Modem, mouse,..) → PS/2 mouse connection → First parallel port → Sound card (digital signal processor) → USB device nodes. → First SCSI device → First SCSI CD-ROM device → CD-ROM drive → floppy drive → The partition on primary hdd

12 4. /etc Contains all system related configuration files Local file used to control the operation of a program Those files must be static and cannot be an executable binary

13 4. /etc … detail /etc/X11/ : contains all the configuration files for the X Window System /etc/X11/XF86Config, /etc/X11/XF86Config-4 : 'X' configuration file /etc/ftpchroot : List of ftp users that need to be chrooted /etc/ftpaccess : Determines who might get ftp-access to your machine. /etc/gateways : Lists gateways for 'routed' /etc/group, /etc/passwd. lists the configured user groups and who belongs to them. /etc/hostname : Contains the hostname of your machine /etc/host.conf : Determines the search order for look-ups

14 4. /etc … detail /etc/hosts : This file is used to define a system name and domain combination with a specific IP address – localhost ::1 localhost – ip6-localhost ip6-loopback – fe00::0 ip6-localnet – ff00::0 ip6-mcastprefix – ff02::1 ip6-allnodes – ff02::2 ip6-allrouters – ff02::3 ip6-allhosts – debian.localdomain.com debian  ws001

15 5. /home The user home directories Accessible only to its owner and the system administrator Contains the user’s personal configuration files Quite large to be used as User’s Documents Space

16 6. /initrd Provides the capability to load a RAM disk by the boot loader. This RAM disk can then be mounted as the root file system and programs can be run from it. Afterwards, a new root file system can be mounted from a different device. The previous root (from initrd) is then moved to a directory and can be subsequently unmounted. Initrd is mainly designed to allow system startup to occur in two phases, where the kernel comes up with a minimum set of compiled-in drivers, and where additional modules are loaded from initrd.

17 7. /lib Contains kernel modules and those shared library images (the C programming code library) needed to boot the system and run the commands in the root filesystem, ie. by binaries in /bin and /sbin Windows equivalent to a shared library would be a DLL (dynamically linked library) file

18 7. /lib … detail /lib/'machine-architecture‘ : Contains platform/architecture dependent libraries. /lib/iptables : iptables shared library files. /lib/kbd : Contains various keymaps. /lib/modules/'kernel-version‘ : The home of all the kernel modules. The organisation of files here is reasonably clear so no requires no elaboration. /lib/modules/'kernel-version'/isapnpmap.dep : has details on ISA based cards, the modules that they require and various other attributes. /lib/modules/'kernel-version'/modules.dep : lists all modules dependencies. This file can be updated using the depmod command. /lib/modules/'kernel-version'/pcimap : is the PCI equivalent of the /lib/modules/'kernel-version'/isapnpmap.dep file. /lib/modules/'kernel-version'/usbmap : is the USB equivalent of the /lib/modules/'kernel-version'/isapnpmap.dep file. /lib/oss : All OSS (Open Sound System) files are installed here by default. /lib/security : PAM library files.

19 8. /lost+found Contains the files which were recovered after an unexpected event, such as a proper shutdown. Try to move each file back to its original location

20 9. /media Contains subdirectories which are used as mount points for removeable media such as floppy disks, cdroms and zip disks

/mnt This is a generic mount point under mounted (mount is to make a filesystem available to the system) the filesystems or devices. When a filesystem no longer needs to be mounted, it can be unmounted with umount mount /dev/hda2 /home umount /dev/hda2

/opt This directory is reserved for all the software and add-on packages that are not part of the default installation /opt/'package'  C:\Windows\Progam Files\"Program Name"

/proc Virtual filesystem, runtime system information (e.g. system memory, devices mounted, hardware configuration, etc). The most of them have a file size of 0 To view, use “cat”. Use “vi” to edit.

/root The home directory of the System Administrator, 'root' Why not in '/home'? Because '/home' is often located on a different partition or even on another system and would thus be inaccessible to 'root' when - for some reason - only '/' is mounted.

/sbin Like /bin bet less important /sbin should contain only binaries essential for booting, restoring, recovering, and/or repairing the system in addition to the binaries in /bin.

/sbin … detail shutdown Fastboot Fasthalt fdisk fsck fsck.* getty halt ifconfig → Command to bring the system down. → Reboot the system without checking the disks (optional) → Stop the system without checking the disks (optional) → Partition table manipulator (optional) → File system check and repair utility (optional) → File system check and repair utility for a specific filesystem (optional) → The getty program (optional) → Command to stop the system (optional) → Configure a network interface (optional)

/sbin … detail init mkfs mkfs.* mkswap reboot route swapon swapoff update → Initial process (optional) → Command to build a filesystem (optional) → Command to build a specific filesystem (optional) → Command to set up a swap area (optional) → Command to reboot the system (optional) → IP routing table utility (optional) → Enable paging and swapping (optional) → Disable paging and swapping (optional) → Daemon to periodically flush filesystem buffers (optional)

/usr The largest share of data on a system the most important directories in the system as it contains all the user binaries, their documentation, libraries, header files, etc.... X and its supporting libraries, and User programs like telnet, ftp, etc.... as well, can be found here.

/var Contains variable data, files and directories the system must be able to write to during operation, like system logging files, mail and printer spool directories, and transient and temporary files