 Before Multics there was chaos, and afterwards, too › Multics:  Multiplexed information and Computing Service  1965 ~ 1969  Bell labs, GE, MIT 

Slides:



Advertisements
Similar presentations
Jump to first page Unix Commands Monica Stoica Jump to first page Introduction to Unix n Unix was born in 1969 at Bell Laboratories, a research subdivision.
Advertisements

Unix. Outline Commands Environment Variables Basic Commands CommandMeaning lslist files and directories ls -alist all files and directories mkdirmake.
1 Introduction to UNIX Ke Liu
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.
UNIX Introduction. Computer Center, CS, NCTU 2 UNIX History (1)  Before Multics there was chaos, and afterwards, too Multics:  Multiplexed information.
Operating Systems Review. User Computer, including HW and SW.
Operating Systems - Introduction S H Srinivasan
1 Basics of Linux On linux machine: Login at your home directory Open a “shell” or “terminal” or “xterm” workspace (4) On windows machine Intall linux.
Unix Basics. Systems Programming: Unix Basics 2 Unix Basics  Unix directories  Important Unix file commands  File and Directory Access Rights through.
UNIX/Linux System Programming Jordan University of Science and Technology History.
CS 141 Labs are mandatory. Attendance will be taken in each lab. Make account on moodle. Projects will be submitted via moodle.
Introduction to Linux Workshop February Introduction Rob Lane & The HPC Support Team Research Computing Services CUIT.
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)
System Administration Introduction to Unix Session 2 – Fri 02 Nov 2007 Reference:  chapter 1, The Unix Programming Environment, Kernighan & Pike, ISBN.
Natawut NupairojAssembly Language1 Unix Survival Guide.
Session 2 Wharton Summer Tech Camp Basic Unix. Agenda Cover basic UNIX commands and useful functions.
UNIX Commands. Why UNIX Commands Are Noninteractive Command may take input from the output of another command (filters). May be scheduled to run at specific.
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.
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.
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 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.
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.
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.
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.
Module 1 - Introduction to Linux. Users must log-in Linux is case sensitive File and Directories naming conventions (No spaces!) Files and Directories.
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.
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.
Learning Unix/Linux Based on slides from: Eric Bishop.
UNIX and SOFTWARE TOOLS Dr. Tran, Van Hoai Faculty of Computer Science and Engineering HCMC Uni. of Technology
Operating Systems Introduction Moti Geva
Overview of Linux Fall 2016 Dr. Donghyun Kim
Linux Commands Help HANDS ON TRAINING Author: Muhammad Laique
UNIX Introduction History Main Features UNIX Operating System
C151 Multi-User Operating Systems
Introduction.
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
Lab 3: File Permissions.
January 26th, 2004 Class Meeting 2
The UNIX Time Sharing System
Presentation transcript:

 Before Multics there was chaos, and afterwards, too › Multics:  Multiplexed information and Computing Service  1965 ~ 1969  Bell labs, GE, MIT  Ken Thompson, Dennis Ritchie

 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 ”

 AT&T › Version 7~10 › System III ~ V  UCB › BSD  IBM 、 DEC 、 HP › OSF/1

 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

 man pages (manual) › Contain descriptions of  Individual command.  $ man cp  Configuration File  $ man rc.local  Library routines  $ man strcpy

 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 3 intro(section introduction)  Man pages organization AT&TBSDContents 11User-Level commands and applications 22System calls and kernel error code 33Library calls 45Standard file format 57Miscellaneous files and documents 66Games and demonstrations 74Device Drivers and network protocols 1m8System administration commands 99Obscure kernel specs and interfaces

 User ID, Group ID › $ id lwhsu  uid=13115(lwhsu) gid=300(gcs) groups=300(gcs),0(wheel),100(faculty),800(security),700(ta),888(wwwadm) › $ id  uid=13115(lwhsu) gid=300(gcs) groups=300(gcs),0(wheel),100(faculty),800(security),700(ta),888(wwwadm)  Super user › root  uid=0(root) gid=0(wheel) groups=0(wheel), …  Other Important Users › daemon: Owner of many system processes › operator: System & › bin: Binaries Commands and Source › nobody: Unprivileged user

 $ ls -l › d rwx--x--x 12 lwhsu gcp 1024 Sep 23 16:47 public_html/ File type File access mode Inode count File user owner File group owner File size Last modify time (mtime) Name

 File types  file command › determine file type  $ file.tcshrc .tcshrc: ASCII text  $ file /bin  /bin: directory  $ file /bin/sh  /bin/sh: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), for FreeBSD 8.0 (800049), dynamically linked (uses shared libs), FreeBSD-style, stripped › /usr/ports/sysutils/file symbolFile types bBlock device file cCharacter device file dDirectory lsymbolic Link sSocket pnamed Pipe -Regular file

 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/

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

 Process: A working program › Foreground  Remain attached to the terminal › Background  Can not communicate with terminal  Process Life Cycle › fork, exec

 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 30Aug08 0:00.01 [swapper] lwhsu p4 R+ 2:30PM 0:00.00 ps auxww

 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