Computer System Management - Unix/Linux

Similar documents
Introduction to Linux

COURSE OUTLINE. UNIX Programming 2014 Fall by Euiseong Seo

a story of alternatives

File System Hierarchy Standard (FHS)

Filesystem Hierarchy and Permissions

Chapter Two. Lesson A. Objectives. Exploring the UNIX File System and File Security. Understanding Files and Directories

Computer System Management - File Systems

Filesystem Hierarchy and Permissions

Filesystem Hierarchy Operating systems I800 Edmund Laugasson

Overview of Unix / Linux operating systems

*nix Crash Course. Presented by: Virginia Tech Linux / Unix Users Group VTLUUG

Linux Systems Administration Getting Started with Linux

Unix System Architecture, File System, and Shell Commands

INTRODUCTION TO LINUX

Introduction to Cygwin Operating Environment

Introduction to Open Source. Marco Zennaro Carlo Fonda

Introduction to Linux

Welcome to getting started with Ubuntu Server. This System Administrator Manual. guide to be simple to follow, with step by step instructions

Introduction to Linux

Introduction to Linux

GNU/Linux 101. Casey McLaughlin. Research Computing Center Spring Workshop Series 2018

Introduction and Overview Getting Started

ICT and Open Source Software

Lezione 8. Shell command language Introduction. Sommario. Bioinformatica. Mauro Ceccanti e Alberto Paoluzzi

EECS2301. Lab 1 Winter 2016

UNIX Concepts COMPSCI 386

Lezione 8. Shell command language Introduction. Sommario. Bioinformatica. Esercitazione Introduzione al linguaggio di shell

CISC 220 fall 2011, set 1: Linux basics

Introduction to Linux

Introduction to Linux. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University

Systems Programming. The Unix/Linux Operating System

EE516: Embedded Software Project 1. Setting Up Environment for Projects

Linux Essentials. Programming and Data Structures Lab M Tech CS First Year, First Semester

Unix to Linux. CS 3113 Fall 2018 Dr. Christan Grant

Introduction to Linux Overview and Some History

Lecture 3. Unix. Question? b. The world s best restaurant. c. Being in the top three happiest countries in the world.

Manage Directories and Files in Linux. Objectives. Understand the Filesystem Hierarchy Standard (FHS)

Introduc+on. General Information. General Information. General Information. General Information. General Information

Linux Operating System Environment Computadors Grau en Ciència i Enginyeria de Dades Q2

Perl and R Scripting for Biologists

Embedded System Design

Today. Operating System Evolution. CSCI 4061 Introduction to Operating Systems. Gen 1: Mono-programming ( ) OS Evolution Unix Overview

Today. Operating System Evolution. CSCI 4061 Introduction to Operating Systems. Gen 1: Mono-programming ( ) OS Evolution Unix Overview

Introduction to Linux Part I: The Filesystem Luca Heltai

Linux Essentials Objectives Topics:

Overview LEARN. History of Linux Linux Architecture Linux File System Linux Access Linux Commands File Permission Editors Conclusion and Questions

Practical Computing-II. Programming in the Linux Environment. 0. An Introduction. B.W.Gore. March 20, 2015

INF322 Operating Systems

GNU/Linux - an Intro. Kesavan Muthuvel

CSC209. Software Tools and Systems Programming.

1 Installation (briefly)

Linux Session Part I. Kesavan M

Chapter-3. Introduction to Unix: Fundamental Commands

System Administration for Beginners

CSC209. Software Tools and Systems Programming.

Linux & Shell Programming 2014

Introduction to Linux (Part I) BUPT/QMUL 2018/03/14

Lecture 01: welcome and intro what LSD and Unix have in common

Linux Files and the File System

Hardening servers for the modern internet

Introduction to Shell Scripting

Overview of the UNIX File System

Linux for Beginners. Windows users should download putty or bitvise:

The UNIX Operating System. HORT Lecture 2 Instructor: Kranthi Varala

Getting Started with Linux

Unix Handouts. Shantanu N Kulkarni

Unix/Linux: History and Philosophy

Linux basics U3A in Bath. Linux Principles. by Andy Pepperdine

Getting started with Hugs on Linux

UNIX Kernel. UNIX History

GNU/Linux: An Essential Guide for Students Undertaking BLOSSOM

Unix Introduction to UNIX

Unix File System. Class Meeting 2. * Notes adapted by Joy Mukherjee from previous work by other members of the CS faculty at Virginia Tech

Introduction to Linux Basics

The landscape. File hierarchy overview. A tree structure of directories The directory tree is standardized. But varies slightly among distributions

tech. solutions T2G Page1 ALT_01_Ch1 : Introduction to Linux ideas and history The History of Linux starts with the earlier development of UNIX.

Introduction: What is Unix?

Commands are in black

(a) About Unix. History

UNIX System Programming Lecture 3: BASH Programming

PROGRAMMAZIONE I A.A. 2015/2016

CSE 303 Lecture 2. Introduction to bash shell. read Linux Pocket Guide pp , 58-59, 60, 65-70, 71-72, 77-80

UNIX. The Very 10 Short Howto for beginners. Soon-Hyung Yook. March 27, Soon-Hyung Yook UNIX March 27, / 29

Introduction of Linux

Introduction. Let s start with the first set of slides

Essential Unix and Linux! Perl for Bioinformatics, ! F. Pineda

Overview of the UNIX File System. Navigating and Viewing Directories

Brief Linux Presentation. July 10th, 2006 Elan Borenstein

Full file at

Course 55187B Linux System Administration

"Charting the Course... MOC B: Linux System Administration. Course Summary

Virtual Machine. Linux flavor : Debian. Everything (except slides) preinstalled for you.

THE HONG KONG POLYTECHNIC UNIVERSITY Department of Electronic and Information Engineering

CS246 Spring14 Programming Paradigm Notes on Linux

CS/CIS 249 SP18 - Intro to Information Security

Chapter 6. Linux File System

Unix Filesystem. January 26 th, 2004 Class Meeting 2

Operating Systems. Copyleft 2005, Binnur Kurt

Operating Systems 3. Operating Systems. Content. What is an Operating System? What is an Operating System? Resource Abstraction and Sharing

System Administration

Transcription:

Computer System Management - Unix/Linux Amarjeet Singh August 30, 2011 Partly adopted from Computer System Management Slides by Navpreet Singh

Logistics Learn-it-yourself topic assignment Many students still have complaints mostly due to confusion caused by others Please come over, together with your conflicting group, and get it resolved personally Any such activity found in the future will result in zero in that assignment without any warning Lab Session 2: Feedback so far? Creative Session: Group-1: Operating System Group-4: Components of Motherboard Group-5: Memory Hierarchy

Survey Feedback Unix commands and shell Knowledge of generic utilities Home network configuration Knowledge of useful utilities Configure a computer from Understanding of internet Computer component Network configuration Interface external devices Don t know anything Vaguely know know fair amount, like to know more know good amount, can handle questions without stydying Expert and can even teach it to peers Improving System Performance OS installation 0.00% 50.00% 100.00% 3

Some revision What is a file system? Why do we need a separate file system for flash? Beneficial to erase unused blocks when the device is idle Random access does not incur latency in flash memory Spreads out writes to avoid wearing out What are the advantages of Journaling filesystem? Less likely to be corrupted in case of system crash Use case? Example filesystems?

Setting Standards for Creative Session CERN - European Organization for Nuclear Research Matter vs antimatter Black holes Big bang theory Let the creative juices flow for your session on September-10 Take help from your mentors in preparation and ideas on topic Lets make it a fun class

Unix: History Unix command - date +%s Unix time (or POSIX time) defined as number of seconds elapsed since Jan 1, 1970 Around 1970 unix was born! Completely written in assembly language - hardware portability was a big constraint First version created by AT&T Bell labs 1972 - rewritten in C language High level language resulted in easier portability 1978 - About 600 machines across the world were running Unix in some form 1980 - BSD 4.1 (Berkeley Software Distribution) Also called Berkeley Unix Shared the initial codebase and design with AT&T Unix 1982 - AT&T released Unix System V, including vi editor

Unix: History 1983: AT&T commercialized Unix - System V Berkeley researchers continued their development of BSD - released version 4.2 Other companies started releasing versions of Unix based on BSD and System V - SunOS (released by Sun Microsystems - co-founded by Bill Joy, leading developer of BSD, in 1982) 1988: AT&T and Sun Microsystems jointly develop System V Release 4 (SVR4) Merged features of BSD, System V and SunOS Later developed into UnixWare and Solaris 2 1993: Most commercial variants of Unix based on System V with BSD features added on top 1991 Linux was born

History of Linux Video from youtube http://www.youtube.com/watch?v=5ocq6_3-new

Linux: The most important email! From: torvalds@klaava.helsinki.fi (Linus Benedict Torvalds) Newsgroups: comp.os.minix Subject: What would you like to see most in minix? Summary: small poll for my new operating system Message-ID: <1991Aug25.205708.9541@klaava.Helsinki.FI> Date: 25 Aug 91 20:57:08 GMT Organization: University of Helsinki Hello everybody out there using minix - I'm doing a (free) operating system (just a hobby, won't be big and professional like gnu) for 386(486) AT clones. This has been brewing since april, and is starting to get ready. I'd like any feedback on things people like/dislike in minix, as my OS resembles it somewhat (same physical layout of the file-system (due to practical reasons) among other things). I've currently ported bash(1.08) and gcc(1.40), and things seem to work. This implies that I'll get something practical within a few months, and I'd like to know what features most people would want. Any suggestions are welcome, but I won't promise I'll implement them :-) Linus (torvalds@kruuna.helsinki.fi) PS. Yes - it's free of any minix code, and it has a multi-threaded fs. It is NOT protable (uses 386 task switching etc), and it probably never will support anything other than AT-harddisks, as that's all I have :-(. Source: http://www.linux.org/people/linus_post.html

Linux: More, if you are interested Autobiography of Linus Torvalds More like a series of emails An exercise in textual communication for someone more used to code language than conversation - Amazon.com Review

A Bit About Licensing Copyleft Every person who receives a copy of work has permission to reproduce, adapt or distribute copies or adaptation but they also are bound by same licensing agreement GNU General Public License (GPL) was the first copyleft license to see extensive use Several other types of licenses, comprehensive comparison at http://en.wikipedia.org/wiki/comparison_of_free_software_licenses Source code of Linux is available to everyone under GNU GPL Kernel version 1.0 was released in 1994-176,250 lines of code Most recent stable version is 3.0.1 (August 5, 2011)

Unix directory structure Looks like an inverted tree structure Start with root directory at the top / and work down through sub-directories underneath it Each node is either a file or directory of files Path of file/directory either in full or relative Full path name starts with root / until you reach the file e.g. /home/condron/source/xntp Relative usually specific to current directory

Unix directory structure Relative path. - current directory.. - parent directory E.g. if I am at /home/frank, how should I go to traceroute using relative path?

Linux Filesystem Hierarchy Standard Current version is 2.3, released in 2004 Slight deviations exist across all Linux distributions but in general broadly applied All files and directories appear under the root director / even if they are stored on different physical device

Linux Filesystem Hierarchy Standard /bin/ : Essential command binaries available in single user mode, e.g. cat, cp, ls, date, dd /boot/ : Boot loader files, grub, system map file /dev/ : Essential devices such as USB ports, serial ports /home/ : User s home directories containing saved files, personal settings (folders like Desktop, Documents, Pictures, Music)

Linux Filesystem Hierarchy Standard /etc/ : Host specific system wide configuration files X11 : config files for X11 Window System Firefox : config files for firefox /lib/ : libraries essential for binaries in /bin and /sbin /media/ : Mount point for removable devices such as CD-ROM /mnt/ : Temporarily mounted filesystems

Linux Filesystem Hierarchy Standard /opt/ : Optional application software packages (any new package that does not come with OS) Config files go in /etc/opt /proc/ : Virtual filesystem documenting kernel and process status as text files e.g. cpuinfo, devices, meminfo, partitions /sbin/ : Essential system binaries e.g. iwconfig, ifconfig /tmp/ : Temporary files, often not preserved across system reboots

Linux Filesystem Hierarchy Standard /usr/ : Secondary hierarchy for user data; contains majority of multi-user utilities and applications /usr/bin/ : Non essential command binaries (not needed in single-user mode) /usr/lib/ : Libraries for binaries in /usr/bin and usr/sbin /usr/sbin/ : Non-essential system binaries e.g. sensors-detect, useradd, arp /usr/src/ : Source code /usr/local/ : Tertiary hierarchy for local data specific to this host

Linux Filesystem Hierarchy Standard /var/ : Variable files - whose content is expected to continually change during normal operations of the system e.g. logs, spool files, temporary email files /var/lib/ : Persistent data modified by programs as they run e.g. databases, openoffice /var/log/ : Various log files e.g. dmesg /var/run/ : Information about running system since last reboot e.g. logged users, running processes /var/www/ : Website file hierarchies; default location for websites served by Apache

Unix shell The original shell was the Bourne shell, sh Every Unix platform will either have the Bourne shell, or a Bourne compatible shell available The default prompt for the Bourne shell is $ (or #, for the root user) Another popular shell is C Shell. The default prompt for the C shell is %

Shell programming Whatever you type on the command line can be written in a file and executed together - shell script For terminal to distinguish a shell script from any other file, the first line of the script should start with #! /bin/sh /bin/sh - tells which program to use to execute the script The first line is followed by commands #! /bin/bash cd /tmp mkdir t To make the terminal understand that the script is executable, set the appropriate bits in file permissions using chmod, e.g.: $ chmod +x shell_script

Learning What did you learn today? Each group to write on a sheet of paper and submit me with their names This is also your attendance for the day