UNIX Filesystem and Hierarchy

Slides:



Advertisements
Similar presentations
Linux Installation LINUX INSTALLATION. Download LINUX Linux Installation To install Red Hat, you will need to download the ISO images (CD Images) of the.
Advertisements

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.
1 Unix Systems Administration Y. K. Chang Generic Unix Directory Structure /bin /dev /etc /sbin /home /lost+found / Root Dir /dsk /rdsk /term /pts /rmt.
Introduction to Unix (CA263) File System
Exploring the UNIX File System and File Security
GNU/Linux Filesystem 1 st AUT GNU/Linux Festival Computer Engineering & IT Department Bahador Bakhshi.
The UNIX 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.
UNIX ™ /Linux Overview Unix/IP Preparation Course May 6, 2012 Serrekunda, The Gambia.
Guide To UNIX Using Linux Fourth Edition
Introduction to Linux Installing Linux User accounts and management Linux’s file system.
Manage Directories and Files in Linux
workshop eugene, oregon UNIX ™ /Linux Overview Unix/IP Preparation Course July 19, 2009 Eugene, Oregon, USA
Chapter 8. Disks and Filesystems. Ordinary Files u What is a file? –a container for ordered data –persistent (stays around) and accessible by name u Unix.
Introduction to UNIX AfNOG X May 2009 Cairo, Egypt.
Unix Basics Chapter 4.
Working with Ubuntu Linux Track 2 Workshop June 2010 Pago Pago, American Samoa.
PacNOG 6: Nadi, Fiji UNIX ™ /Linux Overview Hervey Allen Network Startup Resource Center.
UNIX ™ /Linux Overview Unix/IP Preparation Course May 23, 2010 Kigali, Rwanda.
Chapter Two Exploring the UNIX File System and File Security.
UNIX ™ /Linux Overview Unix/Linux Preparation Course June 27, 2010 Pago Pago, American Samoa.
Linux Administration. Pre-Install Different distributions –Redhat, Caldera, mandrake, SuSE, FreeBSD Redhat Server Install –Check HCL –Significant issues.
Filesystem Hierarchy Dr. Michael L. Collard 1.
UNIX File System by Tero Toikkanen, CAP02S. UNIX Multi-user system Multi-user system Multi-tasking system Multi-tasking system Wide selection of tools.
Linux file system "On a UNIX system, everything is a file; if something is not a file, it is a process." Sorts of files (on a Linux system) Directories:
Installation Objectives –to be aware of Unix installation issues Contents –installing the system –options and packages –disk layout –the swapfile –third.
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.
UNIX ™ /Linux Overview Unix/IP Preparation Course May 29, 2011 Dar es Salaam, Tanzania.
UNIX™/Linux Overview Unix/LINUX Intro Instructors: Reasons:
1 © 2001 John Urrutia. All rights reserved. Chapter 4 The LINUX Filesystem.
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.
Unix File System Chapter 6.1 – Unix file system Home directory – A directory set aside for your personal use – The starting point when you log.
Chapter 10: File-System Interface Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 1, 2005 File-System Interface.
The Unix File system (UFS) Presented by: Gurpreet Singh Assistant Professor Department of School of Computing and Engineering Galgotias University.
CS 245 – Part 1 Using Operating Systems and Networks for Programmers Jiang Guo Dept. of Computer Science California State University Los Angeles.
UNIX File System By Vishal Desai. Introduction Basic purpose of file system: Represent and organize the system resources. But UNIX File System also maps.
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.
Introduction to Unix AfNOG 2006 Workshop May 7, 2006 Nairobi, Kenya Hervey Allen Phil Regnauld.
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,
UNIX Filesystem and Hierarchy AfNOG 2008 Workshop May Rabat, Morocco.
Introduction to Linux PacNOG5 June 2009 Papeete, French Polynesia.
Linux Administration – Finding You Way on the Command Line The Linux File Directory or Tree.
Introduction to Unix AfNOG 2007 Workshop April 22, Abuja, Nigeria Hervey Allen Phil Regnauld.
Getting Started with Linux
Introduction to UNIX AfNOG X May 2009 Cairo, Egypt Instructors:
Unix/IP Preparation Course
UBUNTU INSTALLATION
Linux file system "On a UNIX system, everything is a file;
Linux/Unix - Download Ubuntu Linux :
Chapter 6 File Systems CSNB113 SYSTEM ADMINISTRATION
Structure of Unix OS.
Exploring the UNIX File System and File Security
Operating System Module 1: Linux Installation
Unix : Introduction and Commands
Operating Systems Lecture 4.
Lecture 43 Syed Mansoor Sarwar
Shells, Help, and Paths.
UNIX Commands A Brief Look at Common UNIX Commands.
UNIX File System Go Climb a Tree Weiyu Zhang (96142)
UNIX Commands A Brief Look at Common UNIX Commands.
UNIX Commands A Brief Look at Common UNIX Commands.
UNIX Commands A Brief Look at Common UNIX Commands.
Chapter 4: The Linux Filesystem
January 26th, 2004 Class Meeting 2
Installation Objectives Contents Practical Summary
Presentation transcript:

UNIX Filesystem and Hierarchy AfNOG 2009 Workshop May 2009 – Cairo, Egypt

The UNIX filesystem The file system is a tree. Objects include files, directories (folders), links, devices / <- the root tmp usr var dev bin etc ad0 rc.conf sh bin local folder bin plain file bash executable file / usr / local / bin / bash device file symbolic link

The UNIX filesystem In UNIX, Everything Is A File! (well, almost): disks, terminals, ... Files can be accessed via an explicit path, from the root, to the file: /usr/local/bin/bash -> this is an ABSOLUTE path ... or in relation to where one is located: ../../etc/passwd -> this is a RELATIVE path

Relative vs. Absolute If the 'pwd' command says you are in /usr/local/bin ... / <- the root tmp usr var etc cd ../../../var local cd ../.. rc.d cd .. or ... cd /var bin cd ../../../etc/rc.d or ... ??? cd /etc/rc.d

Mount points

Filesystem Hierarchy

FreeBSD Directory Structure Repeat after me: “The command 'man hier' is your friend.” So, why is your FreeBSD disk slice split in to “partitions”? Largely to separate important file systems from each other. These file systems are usually represented by specific directories. Why not just run with everything in one partition? That is, everything under '/'?

A Few FreeBSD Directories Structure of partitions/directories: / (“root”) /usr /var swap Two important directories: /tmp /usr/home

“/” Root The root partition is where critical system files live, including the programs necessary to boot the system in to “single user” mode. The idea is that this part of the system does not grow or change, but rather stays isolated from the rest of the operating system. If you give enough room to /usr and /var, then “/” can be quite small (around 512MB should be safe for now). One directory that may grow is /tmp, particularly if you run Linux binaries that use /tmp.

/usr Is used for system software like user tools, compilers, XWindows, and local repositories under the /usr/local hierarchy. If one has to expand* this partition for additional software, then having it separate makes this possible. FreeBSD maps user directories to /usr/home. *We'll discuss this. We don't always install FreeBSD with a separate /usr partition.

/var This is where files and directories that consistently change are kept. For example, webserver logs, email directories, print spools, temporary files, etc. On a server it is a good idea to have /var in a separate partition to avoid having it fill your other filesystems by accident.

swap Swap is where virtual memory lives. Swap has its own partition. You can run without swap, but this is dangerous if you run out of memory (programs will stop working) There are several opinions about what is the optimal swap size. This can depend on what type of OS, services you run. The general rule of thumb is that swap size should be somewhere between your RAM and twice your server's RAM.

/ usr var local home spool www john mary Desktop Q. How do we move around in such a tree? Q. “/” to /usr/home/mary? Q. /var/spool to /usr/home/john? Q. /usr/home to /usr/local/www? Q. Etc. / usr var home local home spool www john mary Desktop

Questions ?