UNIX Introduction.

Slides:



Advertisements
Similar presentations
Unix. Outline Commands Environment Variables Basic Commands CommandMeaning lslist files and directories ls -alist all files and directories mkdirmake.
Advertisements

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
More Shell Basics CS465 - Unix. Unix shells User’s default shell - specified in /etc/passwd file To show which shell you are currently using: $ echo $SHELL.
Linux Linux File System.
CMPE 151: Network Administration Spring Class Description Focus: system and network administration. Sequence of exercises. E.g., installing/configuring.
Introduction to Linux and Shell Scripting Jacob Chan.
UNIX/Linux System Programming Jordan University of Science and Technology History.
Overview of Linux CS3530 Spring 2014 Dr. José M. Garrido Department of Computer Science.
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)
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.
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.
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.
MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 10 Case Study 1: LINUX Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
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.
Λειτουργικά Συστήματα - Lab1 Γιάννης Πετράκης. The Operating System  Unix is a layered operating system  The innermost layer is the hardware that provides.
 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.
The Unix File system (UFS) Presented by: Gurpreet Singh Assistant Professor Department of School of Computing and Engineering Galgotias University.
2 Manual & Filestore Mauro Jaskelioff. Introduction Using the manual The UNIX filestore File permissions.
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.
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.
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.
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.
Comp 145 – Introduction to UNIX $200 $400 $600 $800 $1000 $200 $400 $600 $800 $1000 $200 $400 $600 $800 $1000 $200 $400 $600 $800 $1000 Basic Concepts.
Linux Tutorial Lesson Two *Getting Help in Linux *Data movement and manipulation *Relative and Absolute path *Processes Note: see chapter 1,2,3 from Linux.
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
Getting Started with Linux
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
C151 Multi-User Operating Systems
Introduction.
Tools of Web Development 1: Module C: Using Unix
COSC 350 System Programming
The Linux Operating System
Basic UNIX OLC Training.
Introduction to UNIX.
Unix : Introduction and Commands
Web Programming Essentials:
UNIX System Protection
File System.
Department of School of Computing and Engineering
Computer System Administration
System Administration Practice
Chapter 5 The Filesystem
Lab 3: File Permissions.
January 26th, 2004 Class Meeting 2
The UNIX Time Sharing System
Presentation transcript:

UNIX Introduction

UNIX History (1) Before Multics there was chaos, and afterwards, too Multiplexed information and Computing Service 1965 ~ 1969 Bell labs, GE, MIT Ken Thompson, Dennis Ritchie

UNIX History (2) From Multics to something else Ken Thompson first written a game called “Space Travel” on Multics on GE machine in 1969. 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”.

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

UNIX versions

Conventions Syntax of commands: Globing characters 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) man pages (manual) Contain descriptions of Individual command. % man cp File format. % man rc.local Library routines. % man strcpy

man command Command Man pages organization % 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 %man man AT&T BSD Contents 1 User-Level commands and applications 2 System calls and kernel error code 3 Library calls 4 5 Standard file format 7 Miscellaneous files and documents 6 Games and demonstrations Device Drivers and network protocols 1m 8 System administration commands 9 Obscure kernel specs and interfaces

UNIX Concepts - ID User ID, Group ID Super user Other Important Users % id chwong uid=13029(chwong) gid=200(dcp) groups=200(dcp), 800(security), 700(ta) % id 13029 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

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

UNIX Concepts - 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 symbol File types b Block device file c Character device file d Directory l symbolic Link s Socket p named Pipe - Regular file

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/

UNIX Concepts - File Protection Command Minimum Access Needed On file itself On directory file is in cd /home/test x ls /home/test/*.c r ls –s /home/test/*.c rx cat runme cat >> runme w run-binary run-script rm rumme wx

UNIX Concepts - Process Process: A working program foreground remain attached to the terminal background can not communicate with terminal Process Life Cycle fork, exec

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 0 0.0 0.0 0 0 ?? WLs 30Jul06 0:00.01 [swapper] chwong 83736 0.0 0.5 1416 812 p4 R+ 2:30PM 0:00.00 ps auxww

UNIX Concepts - Kill Process kill command % kill –[signal_name] pid % kill –[signal_number] pid % kill –HUP 88192 (hang up, reset) % kill -1 88192 % kill –TERM 12345 (software termination) % kill –15 12345 % kill –KILL 3456 (kill program at OS level) % kill -9 3456