Course Overview and Introduction to the UNIX Shell
|
|
- Corey Sharp
- 5 years ago
- Views:
Transcription
1 Course Overview and Introduction to the UNIX Shell CSC209: Software Tools and Systems Programming (Winter 2019) Furkan Alaca & Paul Vrbik University of Toronto Mississauga Week 1 1 / 54
2 Overview Course Objectives & Outcomes Course Evaluation Scheme and Workflow Academic Integrity and Effective Ways of Getting Help Preparing for CSC209 What is UNIX? Using a UNIX Shell to Run Programs and Access the File System Acknowledgement: These slides are derived, in part, from content written by Andrew Petersen and Dan Zingaro. 2 / 54
3 What is this Course About? Using a UNIX shell The shell is the programmable interface for interacting with a computers core services and kernel (i.e. the computers operating system). Developing more efficiently By creating programming tools for 1. debugging (gdb, valgrind), 2. building and automating (make), and 3. version control (git). 3 / 54
4 What is this Course About? Systems programming Interacting with the OS through 1. the file system, 2. system calls, 3. processes, and 4. communication. The C programming language will be our tool of choice but other systems-level languages exist (e.g. Go). 4 / 54
5 After taking this course, you should be able to... Diagram and explain the memory usage of an arbitrary C-program. Read/use/understand the man pages of unfamiliar system call or library function. Write command-line tools adhering to the UNIX philosophy that leverage: system calls, inter-process communication, the standard library (libc), and the network stack. Effectively use standard UNIX development tools (e.g. gdb, make, git, valgrind, gdb, bash) and command-line utilities (e.g. cat, less, grep). 5 / 54
6 Evaluation Scheme 5% Weekly lecture prep (due 10pm on Sundays) 10% Weekly tutorial exercises (due 10pm on Fridays) 5% Assignment 1 (C Basics and Pointers) 10% Assignment 2 (System Calls and Dynamic Memory) 10% Assignment 3 (Processes) 10% Assignment 4 (Communication) 10% Midterm Exam (Fri. Feb. 15, 5pm) 40% Final Exam (Min. 40% grade required to pass the course) 6 / 54
7 A Typical Week in CSC209 Prepare for class 1. Watch videos on PCRS. 2. Solve simple exercises (worth marks). Attend class 1. Solve more advanced problems in a supervised setting. 2. Ask questions during brief lectures. Execute Put your knowledge into action with assignments and weekly tutorials. 7 / 54
8 Assignment and Tutorial Submission Assignments will be submitted over git. 1. Repositories will be managed with MarkUs: 2. Each assignment or tutorial will have its own directory in your repository. 3. Starter code will be pushed to your repositories. 4. Marks will be made available through the MarkUs web interface. 8 / 54
9 Assignment and Tutorial Submission Marking will be automated. 1. Be extremely deligent with required file names, directory structure, and output format. 2. Ensure that your code compiles without warnings or errors, and can be run without crashing the lab PCs. 9 / 54
10 Code submissions that do not compile will receive a grade of ZERO. 10 / 54
11 Assignment Resubmission You will receive feedback in the form of test results soon after the submission deadline and be permitted a resubmit. 1. The feedback is not your mark: Some tests are worth more than others. 2. Some tests might not even be worth marks. 3. Do your best to fix the errors that we have identified. 11 / 54
12 Assignment Resubmission You will have 48 hours after the feedback is transmitted to correct errors and resubmit. Your assignment will receive the higher of 1. the grade on the original submission and 2. the grade on the resubmission, with a 10% deduction 12 / 54
13 Academic Integrity The work you submit must be your own, done without participation by others. It is an academic offence to hand in anything written by someone else without acknowledgement. Copying We have software which determines if two listings are isomorphic in some way (i.e. variable renaming or line permuting). Any code that you use that is not your own must have correct attribution. 13 / 54
14 Not Academic Offense It is OK to help a friend by 1. Explaining and/or clarifying important concepts. 2. Reviewing/modifying/practicing exercises from PCRS, lectures, and previous weeks tutorials together. 3. Helping each other understand error messages and man pages. 14 / 54
15 Other Resources Discussion Board mcs.utm.utoronto.ca/forum/ Facilitated Study Groups utm.utoronto.ca/asc/facilitated-study-groups-fsgs TAs Ask the TAs questions only after genuinely trying yourself. Do not ask them How do I do the assignment? They can help you understand tools/concepts that you need for completing the assignment, common mistakes, helpful techniques for debugging your code, etc. 15 / 54
16 Linux This course assumes some familiarity with Linux so 1. Get accustomed to using a text editor on Linux (vi, vim, pico). 2. Familiarize yourself with basic shell commands/utilities. 3. Learn to ssh into the lab machines to work remotely $ssh vrbikpau@dh2026pc01.utm.utoronto.ca (windows users install putty) 4. Install a Linux virtual machine on your PC or, 5. Dual-boot. 16 / 54
17 Figure: This is how cool you will feel after taking CSC / 54
18 C Programming This is not a C-programming course. You are expected to learn the syntax yourself. There are many resources. 18 / 54
19 Upcoming This week UNIX shell and compiling C programs 1. Tutorial 1 is due on Friday (Jan. 11) Next week Arrays and pointers 1. Lecture prep is due on Sunday Jan Tutorial is due Friday Jan Assignment 1 posted. 19 / 54
20 The UNIX Philosophy A simple summary of the UNIX philosophy (from A Quarter-Century of Unix by Peter H. Salus, 1994): 1. Write programs that do one thing and do it well. 2. Write programs to work together. 2.1 Expect that the output from your program will be used as input for another (e.g., by piping) 2.2 Do not require interactive input 3. Write programs that handle text streams, because that is a universal interface. 20 / 54
21 UNIX vs. Linux vs. UNIX-like UNIX is a proprietary OS developed by AT&T in 1969 which quickly gave rise to both free and commercial imitations such as BSD (with derivative macos), Linux, Solaris... When we say UNIX we generally refer to these UNIX-like OSs, which are often referred to colloquially as *nix. Linux is the most widely-used OS in the UNIX-like family: It runs on all sorts of devices: PCs, smartphones, printers, security cameras, wireless routers... We use Linux in this course. 21 / 54
22 Time System III & V family BSD (Berkeley Software Distribution) Bill Joy BSD family SunOS Xenix OS Microsoft/SCO GNU Richard Stallman CommercialUNIX HP-UX Minix Research UNIX 10.5 Bell Labs: Ken Thompson, Dennis Ritchie, et al. AT&T FreeBSD NetBSD NextStep 3.3 GNU/Hurd Linux 4.4 Linus Torvalds Andrew S. Tanenbaum Solaris Sun/Oracle OpenBSD Theo de Raadt Darwin UnixWare Univel/SCO macos Apple DragonFly BSD 4.8 Matthew Dillon i v 3 AIX IBM IRIX SGI Timeline of UNIX-like operating systems. 22 / 54
23 Examples of Common UNIX Tools 1. cd 2. mkdir 3. ls 4. cp, mv, rm 5. touch 6. who 7. diff 1. head, tail 2. cat 3. sort 4. grep 5. wc 6. tr (The commands in this column are for text filtering) 1. stdin (standard input) 2. stdout (standard output) 3. stderr (standard error) 4. pipes All of the above in magenta have a man page. 23 / 54
24 How to Learn Linux Learn by doing. Do not worry about memorizing stuff but rather look things up as needed. Resources 1. man name-of-command to learn how a command works. 2. man intro or man gittutorial to learn about topics 3. Arch wiki: (very useful even for users of other Linux flavours such as Ubuntu) 4. Our ultimate goal is to teach you how to learn on your own. 24 / 54
25 Figure: How you will feel when you find an answer in the man pages. 25 / 54
26 Figure: Even the man command has its own man page: Check man man. 26 / 54
27 Consider the following shell command: $ gcc -o hello hello.c The $ is a prompt, i.e., prompting the user for input. We are using the bash shell, but there are others too. A command can be 1. built-in to the shell (cd, ls, type, man builtins), or 2. provided by an executable file 2.1 specified by file path, or 2.2 located by the shell after searching all directories listed in the PATH environment variable. 27 / 54
28 The Shell: Running a Program $ gcc -o hello hello.c $./hello Line 1 compiles the C program hello.c into an executable file hello Line 2 loads the hello program into memory and hands it to the OS to run the program Recall from CSC207: Java programs are compiled into bytecode; C programs are compiled into native code. 28 / 54
29 Memory Model Memory is divided into segments. The program itself is loaded into the bottom segments: 1. Read/write data. 2. Read-only code and data. 29 / 54
30 Question Why in $gcc - o hello hello. c $./ hello is there a./ in front of hello but not gcc? Answer The current directory is typically not in the PATH, so executing command is done by $./command, where. represents the current directory. Type echo $PATH to output your PATH variable. 30 / 54
31 Please ask questions if you spot something unfamiliar. In this course, a single missing or extra character can make a big difference (remember this when we introduce you to our good friends *, **, and & from the C language). Cannot say it is just one character if that character holds important conceptual meaning, compared to perhaps a simple ; which just terminates a statement. 31 / 54
32 / "root" /bin "essential user command binaries" bash cat chmod cp date echo grep gunzip gzip hostname kill less ln ls mkdir more mount mv nano open ping ps pwd rm sh su tar touch umount uname /etc "configuration files for the system" crontab cups fonts fstab host.conf hostname hosts hosts.allow hosts.deny init init.d issue machine-id mtab mtools.conf nanorc networks passwd profile protocols resolv.conf rpc securetty services shells timezone /sbin "essential system binaries" fdisk fsck getty halt ifconfig init mkfs mkswap reboot route /usr /var /dev "read-only user application "variable data files" "device files support data & binaries" incl. /dev/null" /var/cache /usr/bin /home "application "most user "user home cache data" commands" directories" /var/lib /lib /usr/include "data modified as "libraries & "standard include programmes run" kernel modules" files for 'C' code" /var/lock /mnt /usr/lib "lock files to track "mount files for "obj, bin, lib resources in use" temporary files for coding filesystems" & packages" /var/log "log files" /opt /usr/local "optional software /var/opt applications" "local software" "variable data for /usr/local/bin installed packages" /proc /usr/local/lib "process & kernel /usr/local/man /var/spool information files" /usr/local/sbin "tasks waiting to /usr/local/share be processed" /root /var/spool/cron "home dir. for /usr/share /var/spool/cups the root user" "static data sharable /var/spool/mail accross all architectures" /var/tmp /usr/share/man "temporary files saved "manual pages" between reboots" Figure: The UNIX File System Hierarchy 32 / 54
33 The following is the path to the executable file bash (our shell) /usr/bin/bash 1. The leading / represents the root directory. 2. usr is a subdirectory of /. 3. bin is a subdirectory of usr. 4. bash is a file located in bin. 5. A directory is a file that contains directory entries. 6. Each directory entry maps a file name to an inode. 7. An inode is a data structure that contains information about a file, such as its physical address on the disk (CSC369). 33 / 54
34 Directory Entries and inodes Directory Entry afile Inode size owner UID, GID access time modified time creation time link and block counts permissions direct pointers to file blocks single indirect pointer double indirect pointer triple indirect pointer pointers to next file blocks 34 / 54
35 File System Hierarchy on the Lab PCs On most UNIX systems, a user bob s home directory is /home/bob On the lab PCs, it is /student/bob 1. Your home directory is located on a networked file system that is mounted to the local directory /student on every lab PC. 2. Type df to see a list of devices, network locations, etc. that are mounted to directories in your file system. Your home directory is also represented by the shortcut ~ 1. cd ~ changes your current working directory to your home directory. 2. Type pwd to see what your current working directory is. 35 / 54
36 Everything is a file. This is the defining feature of UNIX. It even has its own Wikipedia page en.wikipedia.org/wiki/everything_is_a_file! 36 / 54
37 Files in UNIX UNIX provides a file interface (i.e., open, read, write, and close) for all Input/Output (I/O) 1. Regular files. 2. Directories. 3. Special files (e.g., /dev/null, /dev/urandom). 4. Devices (e.g., keyboard, mouse, printer, video output). Try: cat /dev/urandom padsp tee /dev/audio > /dev/null 5. Pipes for inter-process communication (can be named or unnamed*). 6. Network sockets (sometimes). 37 / 54
38 Redirecting Output By default, programs read from stdin (default: keyboard), write results to stdout (default: screen), and write errors to stderr (default: screen). 1. Use > to redirect stdout, and 2> to redirect stderr. 2. > overwrites the output file; use >> to append and 2 are the file descriptors of stdout and stderr respectively. 38 / 54
39 Example To list the files in the current directory and save (i.e. redirect) the output to myfiles.txt do: $ls > myfiles.txt 39 / 54
40 Pipes and Process Substitution Pipes transfer output from one command as input to another command. Example To count and output the number of lines of text that were generated by the ls command do $ls wc -l 40 / 54
41 Pipes and Process Substitution You can also feed the output of one or more processes to stdin of another process with <; this is called process substitution. Example The following accomplishes the same task as the previous example. $wc -l < ls 41 / 54
42 Pipes and Process Substitution Technicality Whereas a pipe redirects stdin a process substitution saves the output of a command into a temporary file and passes the descriptor of that file to the other process. See examples here unix.stackexchange.com/questions/17107/ process-substitution-and-pipe 42 / 54
43 Directories and Links $ ls file1 file2 file3 test1 test2 $ ls -a... file1 file2 file3. hidden test1 test2 $ ls -la total 16 drwxr - xr - x 4 bob staff 4096 Jan 6 20:18. drwxr - xr - x 3 bob staff 4096 Jan 6 20:18.. -rw -r--r-- 1 bob staff 0 Jan 6 20:16 file1 -rw -r--r-- 1 bob staff 0 Jan 6 20:17 file2 lrwxrwxrwx 1 bob staff 5 Jan 6 20:17 file3 -> file2 -rw -r--r-- 1 bob staff 0 Jan 6 20:18. hidden drwxr - xr - x 2 bob staff 4096 Jan 6 20:16 test1 drwxr - xr - x 2 bob staff 8192 Jan 6 20:16 test2 43 / 54
44 Directories and Links drwxr-xr-x 2 bob staff 4096 Jan 6 20:16 test1 First column is a permission string. First character indicates whether it is a directory (d), link (l), or a regular file (-) 1. A symbolic link is a file that contains a reference to another file 2. A hard link is a regular file that references an inode (doesn t actually appear to ls as a link having multiple hard links to an inode essentially means referencing the same inode by multiple file names) 44 / 54
45 Directories and Links First column is a permission string like drwxr-xr-x The rwx flags represent the read, write, and execute privileges on the file possessed by the user (file owner), group, and other users For a directory, r allows you to list its contents (ls), w allows you to create and delete directory entries in it, and x allows you to enter the directory (cd) 45 / 54
46 Directories and Links drwxr-xr-x 2 bob staff 4096 Jan 6 20:16 test1 Second column is the number of hard links to the inode referenced by the file. 1. Note that. and.. are hard links that are present in every directory 2. If you rm a file name with only one hard link, and if the file is not currently opened by any running process, the file is deleted. Otherwise, only the specified file name is deleted, and the hard link count is decremented 46 / 54
47 Directories and Links drwxr-xr-x 2 bob staff 4096 Jan 6 20:16 test1 Third column is the user (owner) of the file. Forth column is the group of the file. Fifth column is the size (in bytes) of the file. Sixth column is the last modified date of the file. Last column is the file name. 47 / 54
48 Changing File Permissions If you are the file owner (or root), you can change a file s permissions with chmod Example $ chmod 754 file.txt changes the permissions of file.txt to grant: 7: rwx to the user (owner) 5: rx to the group 4: r to all other users Note that in base two 7 = 111, 5 = 101, 4 = 100 which correspond to rwx, r x, r. 48 / 54
49 Changing File Permissions Other ways of using chmod: 1. chmod u+rwx 2. chmod go-x 3. Exercise: See man chmod to find out what the above commands do 49 / 54
50 Globbing 1. Glob patterns are strings that expand to match multiple file names (similar, but simpler, than regular expressions) 2. Check man 7 glob (this displays the contents glob(7), i.e., the glob entry from section 7 of the man-pages) 3. A? matches any single character 4. A * matches any string, including the empty string 5. An expression [list of characters] matches a single character inside the list, e.g., [abc], [a-z], [ax-z] 50 / 54
51 Globbing Example 1. $rm *.log: Remove all files ending in.log from the current directory. 2. $ls *.pdf: List all files in the current directory ending in.pdf 51 / 54
52 Job Control Definition (Job) A job is a program that the user has executed. 1. When a program is running, hit ctrl+z to suspend it 2. jobs gives you the list of jobs, each with an associated job number 52 / 54
53 $fg num Brings job number num to the foreground and resumes execution. The foreground job has control of the terminal. That is, all user input is captured by that job $bg num Brings job number num to the foreground and resumes execution. The background job does not control the terminal, but will be stopped if the terminal is closed. Any command can be started in the background by appending & to the command (e.g., sleep 10&) $kill %num Kills job number num 53 / 54
54 Next Time 1. Arrays and pointers. 54 / 54
CSC209. Software Tools and Systems Programming. https://mcs.utm.utoronto.ca/~209
CSC209 Software Tools and Systems Programming https://mcs.utm.utoronto.ca/~209 What is this Course About? Software Tools Using them Building them Systems Programming Quirks of C The file system System
More informationCSC209. Software Tools and Systems Programming. https://mcs.utm.utoronto.ca/~209
CSC209 Software Tools and Systems Programming https://mcs.utm.utoronto.ca/~209 What is this Course About? Software Tools Using them Building them Systems Programming Quirks of C The file system System
More informationCSC209H Lecture 1. Dan Zingaro. January 7, 2015
CSC209H Lecture 1 Dan Zingaro January 7, 2015 Welcome! Welcome to CSC209 Comments or questions during class? Let me know! Topics: shell and Unix, pipes and filters, C programming, processes, system calls,
More informationLecture 01: welcome and intro what LSD and Unix have in common
Lecture 01: welcome and intro what LSD and Unix have in common Hands-On Unix System Administration DeCal 2012-08-27 1 / 21 The Two of the most famous products of Berkeley are LSD and Unix. I don t think
More information*nix Crash Course. Presented by: Virginia Tech Linux / Unix Users Group VTLUUG
*nix Crash Course Presented by: Virginia Tech Linux / Unix Users Group VTLUUG Ubuntu LiveCD No information on your hard-drive will be modified. Gives you a working Linux system without having to install
More informationLinux for Beginners. Windows users should download putty or bitvise:
Linux for Beginners Windows users should download putty or bitvise: https://putty.org/ Brief History UNIX (1969) written in PDP-7 assembly, not portable, and designed for programmers as a reaction by Bell
More informationIntroduction to Linux
Introduction to Linux Prof. Jin-Soo Kim( jinsookim@skku.edu) TA Sanghoon Han(sanghoon.han@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Announcement (1) Please come
More informationCSC209: Software Tools and Systems Programming. Richard Krueger Office hours: BA 3234
CSC209: Software Tools and Systems Programming Richard Krueger Email : krueger@cs.utoronto.ca Office hours: BA 3234 Administrivia Email: krueger@cs.utoronto.ca Email must include your name. Please set
More informationIntroduction: What is Unix?
Introduction Introduction: What is Unix? An operating system Developed at AT&T Bell Labs in the 1960 s Command Line Interpreter GUIs (Window systems) are now available Introduction: Unix vs. Linux Unix
More informationGNU/Linux 101. Casey McLaughlin. Research Computing Center Spring Workshop Series 2018
GNU/Linux 101 Casey McLaughlin Research Computing Center Spring Workshop Series 2018 rccworkshop IC;3df4mu bash-2.1~# man workshop Linux101 RCC Workshop L101 OBJECTIVES - Operating system concepts - Linux
More informationPerl and R Scripting for Biologists
Perl and R Scripting for Biologists Lukas Mueller PLBR 4092 Course overview Linux basics (today) Linux advanced (Aure, next week) Why Linux? Free open source operating system based on UNIX specifications
More informationIntroduction to Linux
Introduction to Operating Systems All computers that we interact with run an operating system There are several popular operating systems Operating Systems OS consists of a suite of basic software Operating
More informationOverview of Unix / Linux operating systems
Overview of Unix / Linux operating systems Mohammad S. Hasan Staffordshire University, UK Overview of Unix / Linux operating systems Slide 1 Lecture Outline History and development of Unix / Linux Early
More informationEECS 470 Lab 5. Linux Shell Scripting. Friday, 1 st February, 2018
EECS 470 Lab 5 Linux Shell Scripting Department of Electrical Engineering and Computer Science College of Engineering University of Michigan Friday, 1 st February, 2018 (University of Michigan) Lab 5:
More informationFiles and Directories
CSCI 2132: Software Development Files and Directories Norbert Zeh Faculty of Computer Science Dalhousie University Winter 2019 Files and Directories Much of the operation of Unix and programs running on
More informationUnix System Architecture, File System, and Shell Commands
Unix System Architecture, File System, and Shell Commands Prof. (Dr.) K.R. Chowdhary, Director COE Email: kr.chowdhary@iitj.ac.in webpage: http://www.krchowdhary.com JIET College of Engineering August
More informationCSCI 2132 Software Development. Lecture 4: Files and Directories
CSCI 2132 Software Development Lecture 4: Files and Directories Instructor: Vlado Keselj Faculty of Computer Science Dalhousie University 12-Sep-2018 (4) CSCI 2132 1 Previous Lecture Some hardware concepts
More informationComputer Systems and Architecture
Computer Systems and Architecture Stephen Pauwels Computer Systems Academic Year 2018-2019 Overview of the Semester UNIX Introductie Regular Expressions Scripting Data Representation Integers, Fixed point,
More informationBasics of system administration on a Unix system
Basics of system administration on a Unix system Contents Introduction 3 Unix 9 User environment: the shell 10 File management: starting from / 11 Text editing 12 Package management 13 User management
More informationFilesystem Hierarchy Operating systems I800 Edmund Laugasson
Filesystem Hierarchy Operating systems I800 Edmund Laugasson edmund.laugasson@itcollege.ee There has been used materials from Margus Ernits, Katrin Loodus when creating current slides. Current document
More informationEECS2301. Lab 1 Winter 2016
EECS2301 Lab 1 Winter 2016 Lab Objectives In this lab, you will be introduced to the Linux operating system. The basic commands will be presented in this lab. By the end of you alb, you will be asked to
More informationUNIX. The Very 10 Short Howto for beginners. Soon-Hyung Yook. March 27, Soon-Hyung Yook UNIX March 27, / 29
UNIX The Very 10 Short Howto for beginners Soon-Hyung Yook March 27, 2015 Soon-Hyung Yook UNIX March 27, 2015 1 / 29 Table of Contents 1 History of Unix 2 What is UNIX? 3 What is Linux? 4 How does Unix
More informationCOURSE INTRODUCTION. Software Tools EECS2031 Winter 2018 Manos Papagelis. Thanks to Karen Reid and Alan J Rosenthal for material in these slides
COURSE INTRODUCTION Software Tools EECS2031 Winter 2018 Manos Papagelis Thanks to Karen Reid and Alan J Rosenthal for material in these slides What EECS2031 is about? A useful way to think about this course
More informationWelcome to Linux. Lecture 1.1
Welcome to Linux Lecture 1.1 Some history 1969 - the Unix operating system by Ken Thompson and Dennis Ritchie Unix became widely adopted by academics and businesses 1977 - the Berkeley Software Distribution
More informationChapter-3. Introduction to Unix: Fundamental Commands
Chapter-3 Introduction to Unix: Fundamental Commands What You Will Learn The fundamental commands of the Unix operating system. Everything told for Unix here is applicable to the Linux operating system
More informationLinux Command Line Primer. By: Scott Marshall
Linux Command Line Primer By: Scott Marshall Draft: 10/21/2007 Table of Contents Topic Page(s) Preface 1 General Filesystem Background Information 2 General Filesystem Commands 2 Working with Files and
More informationUNIX Kernel. UNIX History
UNIX History UNIX Kernel 1965-1969 Bell Labs participates in the Multics project. 1969 Ken Thomson develops the first UNIX version in assembly for an DEC PDP-7 1973 Dennis Ritchie helps to rewrite UNIX
More informationOutline. Structure of a UNIX command
Outline Structure of Unix Commands Command help (man) Log on (terminal vs. graphical) System information (utility) File and directory structure (path) Permission (owner, group, rwx) File and directory
More informationLinux Essentials. Programming and Data Structures Lab M Tech CS First Year, First Semester
Linux Essentials Programming and Data Structures Lab M Tech CS First Year, First Semester Adapted from PDS Lab 2014 and 2015 Login, Logout, Password $ ssh mtc16xx@192.168.---.--- $ ssh X mtc16xx@192.168.---.---
More informationINTRODUCTION TO LINUX
INTRODUCTION TO LINUX REALLY SHORT HISTORY Before GNU/Linux there were DOS, MAC and UNIX. All systems were proprietary. The GNU project started in the early 80s by Richard Stallman Goal to make a free
More informationHands-on Keyboard: Cyber Experiments for Strategists and Policy Makers
Hands-on Keyboard: Cyber Experiments for Strategists and Policy Makers Review of the Linux File System and Linux Commands 1. Introduction Becoming adept at using the Linux OS requires gaining familiarity
More informationIntroduction to Linux. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University
Introduction to Linux Woo-Yeong Jeong (wooyeong@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu What is Linux? A Unix-like operating system of a computer What is an
More informationUnix Handouts. Shantanu N Kulkarni
Unix Handouts Shantanu N Kulkarni Abstract These handouts are meant to be used as a study aid during my class. They are neither complete nor sincerely accurate. The idea is that the participants should
More informationIntroduction to Linux
Introduction to Linux Prof. Jin-Soo Kim( jinsookim@skku.edu) TA - Kisik Jeong (kisik@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu What is Linux? A Unix-like operating
More information(a) About Unix. History
Part 1: The Unix Operating System (a) About Unix History First roots in the Bell Laboratories, early 60s Kernel rewrite in C by Ritchie / Thompson in the early 70s Source code licenses for Universities
More informationFilesystem Hierarchy and Permissions
and Linux Prepared by Steven Gordon on 19 April 2017 Common/Reports/linux-file-permissions.tex, r1417 1/15 Multiuser and Server Operating System Linux systems are commonly used as a multi-user system E.g.
More informationComputer Systems and Architecture
Computer Systems and Architecture Introduction to UNIX Stephen Pauwels University of Antwerp October 2, 2015 Outline What is Unix? Getting started Streams Exercises UNIX Operating system Servers, desktops,
More informationCS197U: A Hands on Introduction to Unix
CS197U: A Hands on Introduction to Unix Lecture 3: UNIX Operating System Organization Tian Guo CICS, Umass Amherst 1 Reminders Assignment 2 is due THURSDAY 09/24 at 3:45 pm Directions are on the website
More informationIntroduction to Unix The Windows User perspective. Wes Frisby Kyle Horne Todd Johansen
Introduction to Unix The Windows User perspective Wes Frisby Kyle Horne Todd Johansen What is Unix? Portable, multi-tasking, and multi-user operating system Software development environment Hardware independent
More informationIntroduction to Linux
Introduction to Linux Prof. Jin-Soo Kim( jinsookim@skku.edu) TA - Dong-Yun Lee (dylee@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu What is Linux? A Unix-like operating
More informationOverview LEARN. History of Linux Linux Architecture Linux File System Linux Access Linux Commands File Permission Editors Conclusion and Questions
Lanka Education and Research Network Linux Architecture, Linux File System, Linux Basic Commands 28 th November 2016 Dilum Samarasinhe () Overview History of Linux Linux Architecture Linux File System
More informationCS246 Spring14 Programming Paradigm Notes on Linux
1 Unix History 1965: Researchers from Bell Labs and other organizations begin work on Multics, a state-of-the-art interactive, multi-user operating system. 1969: Bell Labs researchers, losing hope for
More informationOperating System Labs. Yuanbin Wu
Operating System Labs Yuanbin Wu cs@ecnu Operating System Labs Introduction to Unix (*nix) Course Overview Operating System Labs Introduction to Unix (*nix) Course Overview Unix / *nix What A family of
More informationScazLab. Linux Scripting. Core Skills That Every Roboticist Must Have. Alex Litoiu Thursday, November 14, 13
Linux Scripting Core Skills That Every Roboticist Must Have Alex Litoiu alex.litoiu@yale.edu 1 Scazlab Topics Covered Linux Intro - Basic Concepts Advanced Bash Scripting - Job scheduling - File system
More informationFilesystem Hierarchy and Permissions
2 and Prepared by Steven Gordon on 19 April 2017 Common/Reports/linux-file-permissions.tex, r1417 1 Multiuser and Server Operating System systems are commonly used as a multi-user system E.g. multiple
More informationCISC 220 fall 2011, set 1: Linux basics
CISC 220: System-Level Programming instructor: Margaret Lamb e-mail: malamb@cs.queensu.ca office: Goodwin 554 office phone: 533-6059 (internal extension 36059) office hours: Tues/Wed/Thurs 2-3 (this week
More informationIntroduction to Linux
Introduction to Linux University of Bristol - Advance Computing Research Centre 1 / 47 Operating Systems Program running all the time Interfaces between other programs and hardware Provides abstractions
More informationIntroduction to Linux
p. 1/40 Introduction to Linux Xiaoxu Guan High Performance Computing, LSU January 31, 2018 p. 2/40 Outline What is an OS or Linux OS? Basic commands for files/directories Basic commands for text processing
More informationCS4350 Unix Programming. Outline
Outline Unix Management Files and file systems Structure of Unix Commands Command help (man) Log on (terminal vs. graphical) System information (utility) File and directory structure (path) Permission
More informationThe Unix Shell & Shell Scripts
The Unix Shell & Shell Scripts You should do steps 1 to 7 before going to the lab. Use the Linux system you installed in the previous lab. In the lab do step 8, the TA may give you additional exercises
More informationIntroduction to Linux (Part I) BUPT/QMUL 2018/03/14
Introduction to Linux (Part I) BUPT/QMUL 2018/03/14 Contents 1. Background on Linux 2. Starting / Finishing 3. Typing Linux Commands 4. Commands to Use Right Away 5. Linux help continued 2 Contents 6.
More informationUnix File System. Class Meeting 2. * Notes adapted by Joy Mukherjee from previous work by other members of the CS faculty at Virginia Tech
Unix File System Class Meeting 2 * Notes adapted by Joy Mukherjee from previous work by other members of the CS faculty at Virginia Tech Unix File System The file system is your interface to: physical
More informationComputer System Management - Unix/Linux
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
More informationIntroduction to Linux
Introduction to Linux Mukesh Pund Principal Scientist, NISCAIR, New Delhi, India History In 1969, a team of developers developed a new operating system called Unix which was written using C Linus Torvalds,
More informationCS356: Discussion #1 Development Environment. Marco Paolieri
CS356: Discussion #1 Development Environment Marco Paolieri (paolieri@usc.edu) Contact Information Marco Paolieri PhD at the University of Florence, Italy (2015) Postdoc at USC since 2016 Email: paolieri@usc.edu
More informationEmbedded Linux Systems. Bin Li Assistant Professor Dept. of Electrical, Computer and Biomedical Engineering University of Rhode Island
Embedded Linux Systems Bin Li Assistant Professor Dept. of Electrical, Computer and Biomedical Engineering University of Rhode Island Generic Embedded Systems Structure User Sensors ADC microcontroller
More informationEECS 2031E. Software Tools Prof. Mokhtar Aboelaze
EECS 2031 Software Tools Prof. Mokhtar Aboelaze Footer Text 1 EECS 2031E Instructor: Mokhtar Aboelaze Room 2026 CSEB lastname@cse.yorku.ca x40607 Office hours TTH 12:00-3:00 or by appointment 1 Grading
More informationCSE 390a Lecture 2. Exploring Shell Commands, Streams, Redirection, and Processes
CSE 390a Lecture 2 Exploring Shell Commands, Streams, Redirection, and Processes slides created by Marty Stepp, modified by Jessica Miller & Ruth Anderson http://www.cs.washington.edu/390a/ 1 2 Lecture
More informationUnix Workshop Aug 2014
Unix Workshop 2014 5 Aug 2014 What is Unix Multitasking, multiuser operating system Often the OS of choice for large servers, large clusters Unix Around You You re probably familiar with these: Linux Solaris
More informationEE516: Embedded Software Project 1. Setting Up Environment for Projects
EE516: Embedded Software Project 1. Setting Up Environment for Projects By Dong Jae Shin 2015. 09. 01. Contents Introduction to Projects of EE516 Tasks Setting Up Environment Virtual Machine Environment
More informationIntroduction. Let s start with the first set of slides
Tux Wars Class - 1 Table of Contents 1) Introduction to Linux and its history 2) Booting process of a linux system 3) Linux Kernel 4) What is a shell 5) Bash Shell 6) Anatomy of command 7) Let s make our
More informationCSC UNIX System, Spring 2015
CSC 352 - UNIX System, Spring 2015 Study guide for the CSC352 midterm exam (20% of grade). Dr. Dale E. Parson, http://faculty.kutztown.edu/parson We will have a midterm on March 19 on material we have
More informationLecture 3. Unix. Question? b. The world s best restaurant. c. Being in the top three happiest countries in the world.
Lecture 3 Unix Question? Denmark is famous for? a. LEGO. b. The world s best restaurant. c. Being in the top three happiest countries in the world. d. Having the highest taxes in Europe (57%). e. All of
More informationBrief Linux Presentation. July 10th, 2006 Elan Borenstein
Brief Linux Presentation July 10th, 2006 Elan Borenstein History 1965 - Bell Labs (AT&T), GE and MIT Project to develop a new (multiuser, multitasking) operating system - MULTICS. (not successful) History
More informationIntroduction to Unix: Fundamental Commands
Introduction to Unix: Fundamental Commands Ricky Patterson UVA Library Based on slides from Turgut Yilmaz Istanbul Teknik University 1 What We Will Learn The fundamental commands of the Unix operating
More informationWelcome to getting started with Ubuntu Server. This System Administrator Manual. guide to be simple to follow, with step by step instructions
Welcome to getting started with Ubuntu 12.04 Server. This System Administrator Manual guide to be simple to follow, with step by step instructions with screenshots INDEX 1.Installation of Ubuntu 12.04
More informationcommandname flags arguments
Unix Review, additional Unix commands CS101, Mock Introduction This handout/lecture reviews some basic UNIX commands that you should know how to use. A more detailed description of this and other commands
More informationEssential Unix and Linux! Perl for Bioinformatics, ! F. Pineda
Essential Unix and Linux! Perl for Bioinformatics, 140.636! F. Pineda Generic computer architecture Memory Storage Fig. 1.2 From Designing Embedded Hardware, 2 nd Ed. by John Catsoulis OS concepts Shell
More informationOn successful completion of the course, the students will be able to attain CO: Experiment linked. 2 to 4. 5 to 8. 9 to 12.
CIE- 25 Marks Government of Karnataka Department of Technical Education Bengaluru Course Title: Linux Lab Scheme (L:T:P) : 0:2:4 Total Contact Hours: 78 Type of Course: Tutorial, Practical s & Student
More informationUnix Filesystem. January 26 th, 2004 Class Meeting 2
Unix Filesystem January 26 th, 2004 Class Meeting 2 * Notes adapted by Christian Allgood from previous work by other members of the CS faculty at Virginia Tech Unix Filesystem! The filesystem is your interface
More informationCSE 303 Lecture 2. Introduction to bash shell. read Linux Pocket Guide pp , 58-59, 60, 65-70, 71-72, 77-80
CSE 303 Lecture 2 Introduction to bash shell read Linux Pocket Guide pp. 37-46, 58-59, 60, 65-70, 71-72, 77-80 slides created by Marty Stepp http://www.cs.washington.edu/303/ 1 Unix file system structure
More informationChapter Two. Lesson A. Objectives. Exploring the UNIX File System and File Security. Understanding Files and Directories
Chapter Two Exploring the UNIX File System and File Security Lesson A Understanding Files and Directories 2 Objectives Discuss and explain the UNIX file system Define a UNIX file system partition Use the
More informationIntroduction in Unix. Linus Torvalds Ken Thompson & Dennis Ritchie
Introduction in Unix Linus Torvalds Ken Thompson & Dennis Ritchie My name: John Donners John.Donners@surfsara.nl Consultant at SURFsara And Cedric Nugteren Cedric.Nugteren@surfsara.nl Consultant at SURFsara
More informationUnix/Linux Basics. Cpt S 223, Fall 2007 Copyright: Washington State University
Unix/Linux Basics 1 Some basics to remember Everything is case sensitive Eg., you can have two different files of the same name but different case in the same folder Console-driven (same as terminal )
More informationCS197U: A Hands on Introduction to Unix
CS197U: A Hands on Introduction to Unix Lecture 11: WWW and Wrap up Tian Guo University of Massachusetts Amherst CICS 1 Reminders Assignment 4 was graded and scores on Moodle Assignment 5 was due and you
More informationIntroduction of Linux
Introduction of Linux 阳 oslab2018_class1@163.com 寅 oslab2018_class2@163.com PART I Brief Introduction Basic Conceptions & Environment Install & Configure a Virtual Machine Basic Commands PART II Shell
More informationLec 1 add-on: Linux Intro
Lec 1 add-on: Linux Intro Readings: - Unix Power Tools, Powers et al., O Reilly - Linux in a Nutshell, Siever et al., O Reilly Summary: - Linux File System - Users and Groups - Shell - Text Editors - Misc
More informationFiles
http://www.cs.fsu.edu/~langley/cop3353-2013-1/reveal.js-2013-02-11/02.html?print-pdf 02/11/2013 10:55 AM Files A normal "flat" file is a collection of information. It's usually stored somewhere reasonably
More informationUnix Tools / Command Line
Unix Tools / Command Line An Intro 1 Basic Commands / Utilities I expect you already know most of these: ls list directories common options: -l, -F, -a mkdir, rmdir make or remove a directory mv move/rename
More informationCourse 144 Supplementary Materials. UNIX Fundamentals
Course 144 Supplementary Materials UNIX Fundamentals 1 Background to UNIX Command Fundamentals This appendix provides a overview of critical commands and concepts Prerequisite knowledge attendees should
More informationA Brief Introduction to Unix
A Brief Introduction to Unix Sean Barag Drexel University March 30, 2011 Sean Barag (Drexel University) CS 265 - A Brief Introduction to Unix March 30, 2011 1 / 17 Outline 1 Directories
More informationContents. Note: pay attention to where you are. Note: Plaintext version. Note: pay attention to where you are... 1 Note: Plaintext version...
Contents Note: pay attention to where you are........................................... 1 Note: Plaintext version................................................... 1 Hello World of the Bash shell 2 Accessing
More informationVersion Control with Git
Version Control with Git Methods & Tools for Software Engineering (MTSE) Fall 2017 Prof. Arie Gurfinkel based on https://git-scm.com/book What is Version (Revision) Control A system for managing changes
More informationIntroduction to the shell Part II
Introduction to the shell Part II Graham Markall http://www.doc.ic.ac.uk/~grm08 grm08@doc.ic.ac.uk Civil Engineering Tech Talks 16 th November, 1pm Last week Covered applications and Windows compatibility
More informationIntroduction To. Barry Grant
Introduction To Barry Grant bjgrant@umich.edu http://thegrantlab.org Working with Unix How do we actually use Unix? Inspecting text files less - visualize a text file: use arrow keys page down/page up
More informationCS370 Operating Systems
CS370 Operating Systems Colorado State University Yashwant K Malaiya Fall 2016 Lecture 5 Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 User Operating System Interface - CLI CLI
More informationBIOINFORMATICS POST-DIPLOMA PROGRAM SUBJECT OUTLINE Subject Title: OPERATING SYSTEMS AND PROJECT MANAGEMENT Subject Code: BIF713 Subject Description:
BIOINFORMATICS POST-DIPLOMA PROGRAM SUBJECT OUTLINE Subject Title: OPERATING SYSTEMS AND PROJECT MANAGEMENT Subject Code: BIF713 Subject Description: This course provides Bioinformatics students with the
More informationUseful Unix Commands Cheat Sheet
Useful Unix Commands Cheat Sheet The Chinese University of Hong Kong SIGSC Training (Fall 2016) FILE AND DIRECTORY pwd Return path to current directory. ls List directories and files here. ls dir List
More informationUNIX File Hierarchy: Structure and Commands
UNIX File Hierarchy: Structure and Commands The UNIX operating system organizes files into a tree structure with a root named by the character /. An example of the directory tree is shown below. / bin
More informationIntroduction to Linux
Introduction to Linux M Tech CS I 2015-16 Arijit Bishnu Debapriyo Majumdar Sourav Sengupta Mandar Mitra Login, Logout, Change password $ ssh, ssh X secure shell $ ssh www.isical.ac.in $ ssh 192.168 $ logout,
More informationLinux Session Part I. Kesavan M
Linux Session Part I Kesavan M 180976 Overview What is an Operating System? UNIX History Parts of the UNIX OS Flavors of UNIX Before Linux GNU project Beginning of Linux Linux Today Linux - free software
More informationUNIX Concepts COMPSCI 386
UNIX Concepts COMPSCI 386 Topics History of C and UNIX The GNU Project Linux Command-Line Basics UNIX-Style File System Multics Multiplexed Information and Computing Service Time-sharing system for mainframes
More informationIntroduction to UNIX. Logging in. Basic System Architecture 10/7/10. most systems have graphical login on Linux machines
Introduction to UNIX Logging in Basic system architecture Getting help Intro to shell (tcsh) Basic UNIX File Maintenance Intro to emacs I/O Redirection Shell scripts Logging in most systems have graphical
More informationIntroduction to Linux
Introduction to Linux January 2011 Don Bahls User Consultant (Group Leader) bahls@arsc.edu (907) 450-8674 Overview The shell Common Commands File System Organization Permissions Environment Variables I/O
More informationUnix Processes. What is a Process?
Unix Processes Process -- program in execution shell spawns a process for each command and terminates it when the command completes Many processes all multiplexed to a single processor (or a small number
More informationCS Unix Tools. Lecture 2 Fall Hussam Abu-Libdeh based on slides by David Slater. September 10, 2010
Lecture 2 Fall 2010 Hussam Abu-Libdeh based on slides by David Slater September 10, 2010 Last Time We had a brief discussion On The Origin of Species *nix systems Today We roll our sleeves and get our
More informationOperating Systems. Copyleft 2005, Binnur Kurt
3 Operating Systems Copyleft 2005, Binnur Kurt Content The concept of an operating system. The internal architecture of an operating system. The architecture of the Linux operating system in more detail.
More informationLinux Systems Administration Getting Started with Linux
Linux Systems Administration Getting Started with Linux Network Startup Resource Center www.nsrc.org These materials are licensed under the Creative Commons Attribution-NonCommercial 4.0 International
More informationOperating Systems 3. Operating Systems. Content. What is an Operating System? What is an Operating System? Resource Abstraction and Sharing
Content 3 Operating Systems The concept of an operating system. The internal architecture of an operating system. The architecture of the Linux operating system in more detail. How to log into (and out
More informationCommand-line interpreters
Command-line interpreters shell Wiki: A command-line interface (CLI) is a means of interaction with a computer program where the user (or client) issues commands to the program in the form of successive
More information