UNIX Introduction. Computer Center, CS, NCTU 2 UNIX History (1)  Before Multics there was chaos, and afterwards, too Multics:  Multiplexed information.

Slides:



Advertisements
Similar presentations
1 Introduction to UNIX Ke Liu
Advertisements

1 UNIX 1 History of UNIX 2 Overview of UNIX 3 Processes in UNIX 4 Memory management in UNIX 5 The UNIX file system 6 Input/output in UNIX.
COMP5102/5122 Lecture 1 Operating Systems (OS) Introduction phones off (please)
Operating Systems Review. User Computer, including HW and SW.
Operating Systems - Introduction S H Srinivasan
Unix Basics. Systems Programming: Unix Basics 2 Unix Basics  Unix directories  Important Unix file commands  File and Directory Access Rights through.
CMPE 151: Network Administration Spring Class Description Focus: system and network administration. Sequence of exercises. E.g., installing/configuring.
UNIX/Linux System Programming Jordan University of Science and Technology History.
Systems Programming Concepts
Overview of Linux CS3530 Spring 2014 Dr. José M. Garrido Department of Computer Science.
System Administration. Computer Center, CS, NCTU 2 What System Administrator Should do? (1)  Ordinary list Install new system, programs and OS updates.
Lesson 1. PC vs. Multi-user System  Personal Computer – each user gets his/her own processor (or multicore processor).  Multi-user system – The processor,
Unix Basics Chapter 4.
Operating systém GNU Linux. History First computers –WW II The Bomb (Alan Turing) Colosus (Thomas Flowers)
FreeBSD huanghs. Computer Center, CS, NCTU 2 Outline  FreeBSD version 9.0-RELEASE 9.1-RC1  Installing FreeBSD From CD-ROM From USB.
System Administration Introduction to Unix Session 2 – Fri 02 Nov 2007 Reference:  chapter 1, The Unix Programming Environment, Kernighan & Pike, ISBN.
Chapter Eight Exploring the UNIX Utilities. 2 Lesson A Using the UNIX Utilities.
Natawut NupairojAssembly Language1 Unix Survival Guide.
Session 2 Wharton Summer Tech Camp Basic Unix. Agenda Cover basic UNIX commands and useful functions.
Agenda Link of the week Use of Virtual Machine Review week one lab assignment This week’s expected outcomes Review next lab assignments Break Out Problems.
Guide To UNIX Using Linux Third Edition Chapter 8: Exploring the UNIX/Linux Utilities.
Operating System Part II: Introduction to the Unix Operating System (The Evolution of Unix)
Unix/Linux cs3353. The Shell The shell is a program that acts as the interface between the user and the kernel. –The shell is fully programmable and will.
Guide To UNIX Using Linux Third Edition Chapter 8: Exploring the UNIX/Linux Utilities.
Week Two Agenda Announcements Link of the week Use of Virtual Machine Review week one lab assignment This week’s expected outcomes Next lab assignments.
UNIX Introduction. Computer Center, CS, NCTU 2 UNIX History  Before Multics there was chaos, and afterwards, too Multics:  Multiplexed information and.
History of UNIX a short version CSCI 333 August 31, 2011.
Welcome to CS323 Operating System lab 1 TA: Nouf Al-Harbi NoufNaief.net.
Week Two Agenda Announcements Link of the week Use of Virtual Machine Review week one lab assignment This week’s expected outcomes Next lab assignments.
Just Enough Unix, Chapter 1
UNIX System Protection. Unix History Developed by Dennis Ritchie and Ken Thompson at AT&T Bell Labs Adapted some ideas from the Multics project in 1969.
MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 10 Case Study 1: LINUX Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
CS2204: Introduction to Unix January 19 th, 2004 Class Meeting 1 * Notes adapted by Christian Allgood from previous work by other members of the CS faculty.
CSE 5343/7343UNIX Case Study1 CSE 5343/7343 Fall 2006 Case Studies UNIX History/Processes.
Lab 3 + Using the Terminal 1. "Under Linux there are GUIs (graphical user interfaces). where you can point and click and drag, and hopefully get work.
UNIX History - joint venture between MIT and Bell Labs (originally called Multics) – Ken Thompson (AT&T) created an operating system to run Space.
 Before Multics there was chaos, and afterwards, too › Multics:  Multiplexed information and Computing Service  1965 ~ 1969  Bell labs, GE, MIT 
Week Two Agenda Announcements Link of the week Use of Virtual Machine Review week one lab assignment This week’s expected outcomes Next lab assignments.
Linux Commands C151 Multi-User Operating Systems.
Introduction 1 Chapter 1. Introduction History and Proliferation Mandate for Change What’s Good and Wrong Scope of this course.
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.
Introduction to UNIX CS 2204 Class meeting 1 *Notes by Doug Bowman and other members of the CS faculty at Virginia Tech. Copyright
1 Introduction to Unix. 2 What is UNIX?  UNIX is an Operating System (OS).  An operating system is a control program that helps the user communicate.
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.
File System. Computer Center, CS, NCTU 2 Files  % ls – l d rwx--x--x 7 liuyh gcs 1024 Sep 22 17:25 public_html File type File access mode # of inodes.
Chapter Eight Exploring the UNIX Utilities. 2 Lesson A Using the UNIX Utilities.
WHY AN OPERATING SYSTEM (OS) OS interacts with hardware and manages programs. Programs not expected to know which hardware they will run on. Must be possible.
Chapter 5 The Filesystem. Computer Center, CS, NCTU 2 Outline  File System Architecture  Pathname  File Tree  Mounting  File Types  inode and file.
Week Two Agenda Announcements Link of the week Use of Virtual Machine Review week one lab assignment This week’s expected outcomes Next lab assignments.
Operating Systems Introduction Moti Geva
Overview of Linux Fall 2016 Dr. Donghyun Kim
MODERN OPERATING SYSTEMS Third Edition ANDREW S
Linux Commands Help HANDS ON TRAINING Author: Muhammad Laique
UNIX Introduction History Main Features UNIX Operating System
Introduction.
COSC 350 System Programming
The Linux Operating System
Unix Operating System (Week Two)
Basic UNIX OLC Training.
Introduction to UNIX.
Unix : Introduction and Commands
UNIX System Protection
UNIX Introduction.
Computer System Administration
System Administration Practice
Section 1: Linux Basics and SLES9 Installation
The UNIX Time Sharing System
Presentation transcript:

UNIX Introduction

Computer Center, CS, NCTU 2 UNIX History (1)  Before Multics there was chaos, and afterwards, too Multics:  Multiplexed information and Computing Service  1965 ~ 1969  Bell labs, GE, MIT  Ken Thompson, Dennis Ritchie

Computer Center, CS, NCTU 3 UNIX History (2)  From Multics to something else Ken Thompson first written a game called “Space Travel” on Multics on GE machine in Implement “Space Travel” on PDP-7 again. Thompson began to design the shell, the editor and the assembler on PDP-7. In 1970, Brian Kernighan suggested the name “UNIX”.

Computer Center, CS, NCTU 4 UNIX genealogy  AT&T Version 7~10 System III ~ V  UCB BSD  IBM 、 DEC 、 HP OSF/1

Computer Center, CS, NCTU 5 UNIX versions

Computer Center, CS, NCTU 6 Conventions  Syntax of commands: Anything between “[” & “]” – are optional. Anything followed by “…” – can be repeated. {a | b} – you should choose one of them. Example:  bork [-x] { on | off } filename … bork on /etc/hosts ○ bork –x /etc/hosts /etc/passwd ○ bork –x /etc/hosts X bork -h /etc/hosts X  Globing characters “*” matches zero or more characters. “?” match one character. “~” means home directory “~user” means home directory of user

Computer Center, CS, NCTU 7 man pages (manual)  man pages (manual) Contain descriptions of  Individual command. –% man cp  File format. –% man rc.local  Library routines. –% man strcpy

Computer Center, CS, NCTU 8 man command  Command % man [-s section] title(AT&T) % man [section] title (BSD)  % man printf(bash printf command)  % man 3 printf (C Standard printf func.)  % man –k exit(keyword search)  Man pages organization AT&TBSDContents 11 User-Level commands and applications 22 System calls and kernel error code 33 Library calls 45 Standard file format 57 Miscellaneous files and documents 66 Games and demonstrations 74 Device Drivers and network protocols 1m8 System administration commands 99 Obscure kernel specs and interfaces %man man

Computer Center, CS, NCTU 9 UNIX Concepts - ID  User ID, Group ID % id chwong  uid=13029(chwong) gid=200(dcp) groups=200(dcp), 800(security), 700(ta) % id  uid=13029(chwong) gid=200(dcp) groups=200(dcp), 800(security), 700(ta)  Super user root  uid=0(root) gid=0(wheel) groups=0(wheel), …  Other Important Users daemon: owner of unprivileged software bin: owner of system commands sys: owner of the kernel and memory images nobody: owner of nothing

Computer Center, CS, NCTU 10 UNIX Concepts - Files  % ls – l d rwx--x--x 12 chwong dcp 1024 Sep 12 16:47 public_html/ File type File access mode # of inodes File user owner File group owner File size File last modify time File name

Computer Center, CS, NCTU 11 UNIX Concepts - File types  File types  file command determine file type  % file.tcshrc .tcshrc: ASCII text  % file /bin  /bin: directory  % file /bin/sh  /bin/sh: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), dynamically linked (uses shared libs), stripped /usr/share/misc/magic symbolFile types bBlock device file cCharacter device file dDirectory lsymbolic Link sSocket pnamed Pipe -Regular file

Computer Center, CS, NCTU 12 UNIX Concepts - File Access Mode  rwx r-x r-x User, group, other privileges  chmod command % chmod access-string file  % chmod u+x test.sh  % chmod go-w.tcshrc  % chmod u+w,r-w hehe haha  % chmod – R 755 public_html/

Computer Center, CS, NCTU 13 UNIX Concepts - File Protection Command Minimum Access Needed On file itselfOn directory file is in cd /home/testx ls /home/test/*.cr ls – s /home/test/*.c rx cat runmerx cat >> runmewx run-binaryxx run-scriptrxx rm rummewx

Computer Center, CS, NCTU 14 UNIX Concepts - Process  Process: A working program foreground  remain attached to the terminal background  can not communicate with terminal  Process Life Cycle fork, exec

Computer Center, CS, NCTU 15 UNIX Concepts - Watching Process  ps command ps –aux, ps –auxww  USER, PID, %CPU, %MEM, VSZ RSS, TTY, STAT, START, TIME, COMMAND –D: in Disk –I: Idle –R: Running –S: Sleeping –T: sTopped –Z: Zombie –man ps … USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND root ?? WLs 30Jul06 0:00.01 [swapper] chwong p4 R+ 2:30PM 0:00.00 ps auxww

Computer Center, CS, NCTU 16 UNIX Concepts - Kill Process  kill command % kill –[signal_name] pid % kill –[signal_number] pid  % kill – HUP 88192(hang up, reset)  % kill  % kill – TERM 12345(software termination)  % kill –  % kill – KILL 3456(kill program at OS level)  % kill