CS 307: UNIX PROGRAMMING ENVIRONMENT REVIEW FOR EXAM 1
|
|
- Ami Pearson
- 6 years ago
- Views:
Transcription
1 CS 307: UNIX PROGRAMMING ENVIRONMENT REVIEW FOR EXAM 1 Prof. Michael J. Reale Fall 2014
2 EXAM 1 OVERVIEW
3 Exam 1 Material Exam 1 will cover the following: REVIEW slides from (1) to (9) (INCLUSIVE) Quizzes 0, 1, and 2 It may also cover anything we ve touched on in the katas.
4 REVIEWS (1) and (2) (1) Course Intro (2) HISTORY OF UNIX
5 UNIX Defined UNIX = operating system Multi-user Multitasking Manages resources, data, users, and user interaction
6 UNIX Components UNIX has: Kernel main control program File system everything is a file Shell user interaction program Utilities and tools makes it a complete OS
7 UNIX Origins UNIX Third system: CTSS Multics UNIX Developed at Bell Labs (AT&T) in 1969 First developed on PDP-7 Invented by Ken Thompson Bonus: built to play his game Space Travel Co-invented by Dennis Ritchie (inventor of C) ORIGINALLY called UNICS and single-user renamed UNIX in 1970 when multi-user
8 C Origins C Language Invented by Dennis Ritchie Started working on it in 1971 Built off interpreted language called B UNIX rewritten in C in 1973, making code: Readable Modifiable Portable ( as opposed to the original assembly code)
9 UNIX Growth UNIX given away to universities (AT&T couldn t sell it public utility) 6 th edition parent of System III System V (AT&T) BSD (Berkeley) Developed by grad student Bill Joy Minix (Tannenbaum)
10 UNIX Woes 1981: Microsoft makes deal with IBM to include MS-DOS in new IBM PCs 1983: Start of UNIX Wars AT&T commercializes System V and closed source Legal battles between System V (AT&T) and BSD (Berkeley) Delays PC port of BSD until 1993 FreeBSD
11 GNU and FSF GNU Project Started in 1983 by Richard Stallman 1985: GNU manifesto and Free Software Foundation GNU = GNU s Not Unix Wanted to make free OS (didn t finish) Started with OS utilities VERY important later for Linux Pushed open source and free (as in free speech ) software
12 Linux Linux kernel Released in 1992 by Linus Torvalds (Finnish grad student) Frustrated with not having free Unix Didn t know about delayed BSD port Open Source Coded from scratch (Unix-like) Linux OS Linux kernel + GNU/FSF utilities = complete OS! Different distributions different utilities/applications bundled
13 System Interaction Graphical User Interface (GUI) Applications on top of OS Command Line Interface Also have Virtual Consoles (CTRL-ATL-F[2-9]) Both can be used locally or remotely
14 Shell Shell Two primary functions: Command interpreter Programming interface Case sensitive!
15 Users Unix is a multi-user environment Each user has: Home directory User ID Group ID Commands: Who am I: id Who are you: id username Who is connected: w / who
16 REVIEW (3) INTRODUCTION TO SHELLS, COMMANDS, MAN PAGES, TEXT EDITORS, And COMPILERS
17 Shell: Definition Shell - program that allows user to: Enter commands and run programs Redirect input and output Program/script in shell itself
18 Shell / Kernel / User Relationship Kernel: Creates shell when you login Connects user to shell Provides services and exposes resources to programs (including the shell) Disposes of shell when user is done
19 Unix Shells Thompson s (original Unix shell) Bourne (sh) Korn (ksh) Bourne Again (bash) C-Shell (csh) TCSH (tcsh)
20 Unix Shell Family Tree
21 More about Shells See available shells cat /etc/shells Can switch to different shell by calling it as program Can write your own shell (regular program)
22 Shell Customization Bourne (sh): /etc/profile then ~/.profile Bourne Again (bash) Login shells On login: /etc/profile then either ~/.bash_profile OR ~/.bash_login OR ~/.profile On logout: ~/.bash_logout Interactive, non-login shells: ~/.bashrc C-shell and descendants All shells: ~/.cshrc On login: ~/.login On logout: ~/.logout
23 Command Syntax Command_name options arguments Options = how command is run May be combined E.g., ls al instead of ls a l May have option arguments E.g., cal B 2 May be long options with double-dash E.g., less --version Arguments = additional information (e.g., filenames)
24 Command History Up arrow access previous commands Type first two letters then UP search command history TAB or CTRL+D Autocomplete
25 More About Commands Group commands with a semicolon ; Example: cd ; ls Default options and arguments Example: cal default arguments of current month and year Example: cd default argument ~ (home) Stop commands with CTRL-C (Interrupt)
26 Common Signals Sequence ^A ^E ^C ^D ^U ^L Action Move cursor to start of line Move cursor to end of line Interrupt. Break out of what you're doing eof. End of transmission, end of file Erase entire input line Clear screen above current line ^ is CTRL key
27 MAN Pages MAN pages = documentation for Unix system and programs man [section] command man -k keyword - search the man pages Quit q Help h
28 Common Text Editors pico simple text editor from Univ. of Washington nano - GNU pico clone vi - original UNIX text editor vim - vi Improved
29 GNU C/C++ Compiler gcc & g++ gcc compiles C code g++ compiles C++ code Source code file extensions must either be.c or.cpp Example: gcc -o name_of_executable source.c OR g++ -o name_of_executable source.cpp
30 REVIEW (4) UNIX FILES
31 What is a file? File Anything that can be a source or destination of data Can be READ and/or WRITTEN to In Unix/Linux, everything is a file Types of files: Ordinary or regular files Directories Pseudo files
32 Ordinary / Regular Files Ordinary / Regular files Have certain size Reside on storage device May be text or binary
33 Directories Directories Keep track of organization/location of other files Organized in tree structure (parents and children)
34 Pseudo Files NOT used to store data do not take up space Used to access a service provided by the kernel Types of pseudo files: Special / device files Physical devices or pseudo-devices In /dev directory Named pipe Proc file
35 Special / Device Files: Physical Devices Most use numbers on end of name (/dev/fd0, /dev/fd1) Hard disks use letters (/dev/hda, /dev/hdb) Numbers for partitions (/dev/hda1, /dev/hda2) IDE and SCSI/SATA /dev/hda, /dev/sda
36 Special / Device Files: Terminals Terminals TTY e.g., /dev/tty1 Bonus: Teletype machines original Unix terminals PTY pseudo-terminals for GUI window OR remote connection (e.g., /dev/ttyp1 OR /dev/pts/1)
37 Special / Device Files: Pseudo-Devices Bit buckets (write to them and data disappears) /dev/null if READ, returns EOF (end of file) /dev/zero if READ, returns ZERO (null terminator) Random number generation /dev/random waits /dev/urandom does not wait
38 Block vs. Character Character devices Device that reads or writes data one character at a time Block devices Device that reads or writes data one block at a time
39 Piping and Named Pipes Piping = passing output of one program as the input of another through a pipe Example: cat /etc/passwd wc l Above example is an Anonymous Pipe Named Pipe Also called FIFO ( first-in first-out ) Created with mkfifo command
40 Proc Files Proc files Allow you to get system and process information Processes: /proc/<process ID> System info example: /proc/cpuinfo All proc files in /proc directory
41 Identifying a File Identifying files ls l file command
42 REVIEW (5) UNIX FILESYSTEM
43 Filesystem Defined File system A disk or portion of a disk structured to store data Unix filesystem Organized like tree Root directory / Base of tree; highest level of the filesystem
44 Current and Parent Directories Every directory has two folders:. (Dot) = current directory (working directory).. (Dot-Dot) = parent directory
45 Home Directory with ~ ~ = your home directory Implemented by the shell ~someotheruser = someotheruser s home directory
46 Pathnames and Filenames Path or Pathname Specific file/directory location Absolute path path starts with root (/) Relative path - starts from your current directory (no / at beginning) Filename or Basename Actual name of a file at the end of a path
47 Common Directory Commands cd = changes current directory pwd = prints current directory ls = lists contents of directory ls l = long format listing mkdir makes a directory mkdir p = makes all in-between directories rmdir = removes a (empty) directory
48 Common File/Directory Commands mv = move and/or rename file or directory cp = copy files and directories cp R = copy recursively rm removes files (and directories with r recursive option) cat = prints out contents of file to screen more/less = read contents of file
49 Filename Restrictions and Conventions Restrictions: Any sequence of ASCII characters up to 255 characters Conventions: Start with alphabetic character Include extension (e.g., *.txt) Avoid spaces use (hyphen), _ (underscore), or. (dot) Use quotes if spaces in filename Avoid special characters (metacharacters) However, can use \ (escape character)
50 Hidden Files Hidden files begin with. (dot) Example:.login Can see hidden files with ls -a
51 procfs Filesystem /proc files = another filesystem called procfs Give information about system, kernel, and processes Super-user can modify values as well
52 REVIEW (6) (Parts 1,2, and 3) FILE GLOBBING, FILE SPACE, PERMISSIONS, and LINKS
53 Wildcards Wildcards Used to specify range of characters Shell interprets pattern and replaces it with appropriate filenames before command is run Globbing When the shell performs the substitution
54 Common Wildcards * (star) = match any sequence of zero or more characters? (question mark) = match any single character [list] = match any character in list OR matches character range (e.g., [a-z]) [^list] = match any character (or range) NOT in the list {s1,s2 } = match one of the specified strings (called Brace Expansion)
55 File Space Overview Three notions of space: Amount of DATA IN THE FILE The NUMBER OF BLOCKS the filesystem allocates for the file The NUMBER OF ALLOCATION UNITS on disk
56 Finding the Size of a File with ls ls ls l how much DATA is actually in the file Add h for human-readable sizes ls s size that each file TAKES UP ON DISK Both show total in disk space at top (NOT recursive!)
57 Finding size with du du Gives you how much space files take up on disk Includes all subdirectories and files in totals -h human-readable version -s gives you the sum total -a also lists each file (not just the directories)
58 Determining Disk Usage and Free Space df disk free-space gives you filesystem information How much space used, available, and use % -h human-readable version
59 File Permissions Every file (including every directory, etc.) has certain permissions associated with it There are three kinds of permissions: READ WRITE EXECUTE
60 Permissions in More Detail READ ( r ) Read from file or read contents of directory (ls) WRITE ( w ) Write to file OR move/copy/delete folder EXECUTE ( x ) Execute file (script/program) OR cd to directory
61 IDs Each user has a userid Each group has a groupid User can be part of one or more groups Primary and supplementary groups When you run a program, it can only do what your userid is permitted to do
62 I AM ROOT root user The master-and-commander user, primary administrator, and the user who can pretty much do whatever he/she wants Also called the super-user Home directory: /root To login as root: su To execute a command as root: sudo
63 id command id shows: userid and name Primary groupid and name Supplementary groupid s and names
64 File ownership All files are owned by: A user A group User has to be part of group (unless admin overrides this)
65 File Permissions by People Three sets of permissions: Owner permissions - for the userid who owns the file Group permissions - for the groupid who owns the file World/Other permissions - for everyone else NOT included by the previous two
66 Showing Permissions ls l will list the permissions
67 Permission String Three sets of permission strings: owner, group, and world/others For each string: r = read permission w = write permission x = execute permission - = permission not granted
68 Setting permissions with chmod chmod Sets permissions using octal number string First digit = owner, second digit = group, third digit = world/others Convert digit to binary shows which permissions toggled on or off
69 Default Permissions and umask By default, system assigns: 666 = non-executable ordinary files 777 = executable ordinary files 777 = directories Then subtracts user mask from the permissions umask command to set user mask Final permission = (system default) (umask)
70 setuid setuid ( set U-I-D ) or suid Special permission that allows other non-owner users to access a file as if they were the owner Usually used by root to allow regular users to run certain system programs Has s in owner execute permission slot (instead of x )
71 Inodes Inode One for every file and directory All inodes stored in inode table Contains size, owner, file permissions, number of hard links to file, type of file, etc. DOES NOT STORE FILENAME!
72 Hard Links (Hard) Link Link that points to an inode Connection between filename and inode Directories store link information Inode deleted ONLY when all hard links deleted Problems: Cannot span filesystems Cannot link to directories
73 Soft (or Symbolic) Links Soft (or Symbolic) Links Also called symlinks Contains pathname of original file (NOT inode) Analogous to Windows shortcut Can be used with directories and across filesystems Removing destination does NOT get rid of link (although it won t work)
74 Making Links with ln ln file newname Default: creates a HARD link to a file and calls the link newname ln s path newlink Creates SOFT LINK to path named newlink
75 REVIEW (7) MOUNT AND UNMOUNT, TOUR OF UNIX FILESYSTEM
76 Mounting Each storage device has its own filesystem Mounting Attaching the root of one filesystem to a directory in main filesystem Allows access to that attached filesystem Bonus: called mounting because of old removable disk packs
77 mount and umount Commands mount mounts a filesystem manually Example: mount /dev/fd0 /media/floppy umount unmounts a filesystem manually Example: umount /media/floppy
78 List All Mounted Systems Call mount by itself cat /etc/fstab /etc/fstab = filesystem table
79 FHS (Filesystem Hierarchy Standard) Tour /bin holds most important system programs /boot files required when booting system /dev device files /etc configuration files
80 FHS (Filesystem Hierarchy Standard) Tour (continued) /home home directories /lib essential shared libraries as well as kernel modules needed for programs in /bin and /sbin /lost+found damaged files that have been recovered by fsck
81 FHS (Filesystem Hierarchy Standard) Tour (continued) /media mount point for removable media /mnt mount point for fixed media not mounted elsewhere /opt third-party applications ( optional software ) /proc Proc files
82 FHS (Filesystem Hierarchy Standard) Tour (continued) /root home directory for root user (superuser) /sbin essential system administration programs run by superuser ( system binaries ) /srv data for services provided by local system (e.g., storage for web, ftp, etc.) /tmp temporary files; anyone can store things here, but contents removed automatically
83 FHS (Filesystem Hierarchy Standard) Tour (continued) /usr secondary filesystem used for static data /var secondary filesystem used for variable data
84 So Many Bins GENERAL-USE PROGRAMS /bin essential programs /usr/bin non-essential programs /usr/local/bin locally installed programs SYSTEM ADMINISTRATION PROGRAMS /sbin essential system admin programs run by su /usr/sbin non-essential system admin programs run by su /usr/local/sbin locally installed system programs THIRD-PARTY APPLICATIONS /opt/xxx static data for application xxx; includes programs /var/opt/xxx variable data for application xxx;
85 Root Filesystem Root filesystem Holds essential data/utilities for Unix to start Includes at minimum: /bin /boot /dev /etc /lib /root /sbin /tmp These are always stored on the boot device Once kernel started, other systems mounted automatically
86 Virtual Filesystem (VFS) Virtual Filesystem (VFS) API that handles details of working with different filesystems in OS (physical, pseudo files, etc.)
87 REVIEW (8) (Parts 1 and 2) ADVANCED SHELL USAGE: VARIABLES
88 Two Shell Families Bourne family (including sh, bash, and ksh) C-Shell family (including csh and tcsh)
89 What shell am I using? echo $0 Shell you are currently using echo $SHELL Default shell
90 Shell: Interactive AND Non-Interactive Interactive shell User submitting commands / getting feedback Login shells Non-interactive shell Shell runs shell script and terminates when done
91 Processes Process a specific instance of a program that is executing Contains information about the running program Can have multiple instances of same program each instance is its own process
92 ps command ps Shows the currently running processes By default, only shows your processes ps a Shows ALL currently running processes On some systems, it might be ps e
93 Parents and Children Example: run vi from your shell The shell process is the parent process (or parent) The vi process is the child process (or child)
94 Variables and Environment Variable thing that holds information Name identifier for the variable Value data stored in the variable Environment table of variables a process has access to
95 Variables in Unix Name Only letters, numbers, and underscore Must begin with letter or underscore Value almost always character string
96 Variables in Unix Can do the following with variables Create them Get value from them Change value Destroy them
97 Variables in Unix Two types of variables in Unix: Environment variables Shell variables
98 Environment and Shell Variables Environment variables Variables part of process s environment Similar to global variables in programming Passed from parent process to child process Shell variables Local to the currently running shell NOT passed down to child processes
99 Listing Variables env lists all environment variables set lists all shell variables
100 Printing the Value of a Variable Use $ to get value and echo command Example: echo $SHELL To be very clear, use curly braces {} Example: echo ${SHELL}
101 General Variable Information Environment variables only propagate DOWN the process tree (values do NOT go up the tree) Some variables have means as both local (shell) variables and global (environment) variables Bourne family vs. C-Shell family on how to handle this
102 C-Shell Family Variables A variable is either local OR global Shell variable local By convention, lowercase set myvar= Hello unset destroy shell variable Environment variable global By convention, UPPERCASE setenv MYVAR Hello unsetenv destroy environment variable Exception: certain special variables (both global and local copies)
103 Bourne Family Variables A variable is either local or local+global Shell variables local MYVAR= Hello new variable = shell variable by default Environment variables local AND global export MYVAR makes shell variable environment variable (local+global) export MYVAR= Hi set and export at same time ALL variables UPPERCASE names by convention unset destroys variable
104 Printing Variables env set Both shell families: prints all environment variables C-Shell: print all shell variables Bourne: print all shell variables AND environment variables (environment variables = both)
105 PATH variable PATH list of directories shell searches for command Bourne environment variable C-Shell dual shell/environment variables (path/path)
106 Controlling Shell Behavior C-Shell use shell variables Bourne use shell options set o (turn on) or set +o (turn off) Commands by themselves display options
107 REVIEW (9) QUOTING/ESCAPING, COMMAND SUBSTITUTION, SEARCH PATH
108 Metacharacters Certain characters have special meaning in the shell Examples: $ ;? * To print characters, must quote/escape them
109 \, Strong Quotes, and Weak Quotes \ (backslash) = escape character Works on anything (single quotes) = strong quotes Escapes/quotes everything (double quotes) weak quotes Quotes everything EXCEPT $ (dollar), ` (backquote), and \ (backslash)
110 Command Substitution ` (backquote) command substitution Example: set myshell=`basename ${SHELL}` NOTE: Must use backquotes on both ends!
111 Search PATH PATH variable shell searches in these directories for commands; stops when command found To add to path (ex: $HOME/bin): Bourne: export PATH= $PATH:$HOME/bin C-Shell: set path = ($path $HOME/bin) Can also add current directory. (Dot) Add on end DO NOT ADD AT ALL AS ROOT USER!
112 NOTE ON QUIZZES
113 Note on Quizzes The quizzes up to this point have covered the material up to and including REVIEW 06 (Part I) I may still ask about other material from those preceding review slides
114 QUIZ 0
115 Quiz 0: Question 1 Question 1: Main Control Program of OS = Kernel The shell does allow the user to submit commands, but ultimately the kernel is the last word on what is executed Many shells, but only one kernel Called kernel even under non-unix systems (OS term)
116 Quiz 0: Question 2 Multics was the system before Unix Some put down UNICS, but technically it was the same system as Unix (before multi-user support was added)
117 Quiz 0: Question 3 Dennis Ritchie inventor of C and co-inventor of Unix Richard Stallman starts GNU project and FSF
118 Quiz 0: Question 5 Two primary functions of a shell: Command interpreter Programming interface shell scripting
119 Quiz 0: Question 6 (BONUS) Space Travel game written by Ken Thompson (that in part prompted the development of Unix)
120 QUIZ 1
121 Quiz 1: Question 1 Apart from redirecting input/output, what are the two primary functions of the shell? Command interpreter Programming interface (shell scripting)
122 Quiz 1: Question 2
123 Quiz 1: Question 3 GENERAL syntax of a command (not a specific command) CommandName Options Arguments (Each separated by whitespace)
124 Quiz 1: Question 4 Documentation for the Unix system and programs: MAN pages
125 Quiz 1: Question 5 How does Unix define a file (in the broadest possible sense)? File = source or destination of data (anything that can be READ and/or WRITTEN to)
126 Quiz 1: Question 6 Two types of ordinary/regular files Text Binary
127 Quiz 1: Question 7 Files that are NOT directories or ordinary files Pseudo files
128 Quiz 1: Question 8 (BONUS) The two bit buckets /dev/null returns EOF /dev/zero returns zero
129 QUIZ 2
130 Quiz 2: Question 1 Unix filesystem organized like a tree; what directory is at the very base of the tree? Root directory /
131 Quiz 2: Question 2 Two special directories created automatically by the filesystem in EVERY directory:. (Dot) CURRENT (working) directory Where you are now.. (Dot-Dot) Parent directory Parent of current working directory
132 Quiz 2: Question 3 Absolute path path starts with root (/) Relative path - starts from your current directory (no / at beginning)
133 Quiz 2: Question 4 Command to print absolute path of your current working directory: pwd
134 Quiz 2: Question 5 Hidden files begin with. (dot) Example:.login
135 Quiz 2: Questions 6-10 Files in directory: a, ab, ac, abc, b, bc, cde, def ls a* a, ab, ac, abc a + (zero or more chars) ls a? ab, ac a + (ONE character) ls a?c abc a + (ONE character) + c ls [a-c]* begins with a through c (a,b, OR c) + (zero or more chars) ls [^a-c]* DOES NOT begin with a through c (a,b, OR c) + (zero or more chars)
136 Quiz 2: Question 11 (BONUS) Globbing = when shell automatically replaces wildcard patterns with matching filenames Example: the previous 5 questions
CISC 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 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 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 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 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 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 informationSystem Programming. Unix Shells
Content : Unix shells by Dr. A. Habed School of Computer Science University of Windsor adlane@cs.uwindsor.ca http://cs.uwindsor.ca/ adlane/60-256 Content Content 1 Introduction 2 Interactive and non-interactive
More informationTable of contents. Our goal. Notes. Notes. Notes. Summer June 29, Our goal is to see how we can use Unix as a tool for developing programs
Summer 2010 Department of Computer Science and Engineering York University Toronto June 29, 2010 1 / 36 Table of contents 1 2 3 4 2 / 36 Our goal Our goal is to see how we can use Unix as a tool for developing
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 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 informationLinux & Shell Programming 2014
Unit -1: Introduction to UNIX/LINUX Operating System Practical Practice Questions: Find errors (if any) otherwise write output or interpretation of following commands. (Consider default shell is bash shell.)
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 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 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 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 informationThe Online Unix Manual
ACS-294-001 Unix (Winter Term, 2018-2019) Page 14 The Online Unix Manual Unix comes with a large, built-in manual that is accessible at any time from your terminal. The Online Manual is a collection of
More informationCrash Course in Unix. For more info check out the Unix man pages -orhttp://www.cs.rpi.edu/~hollingd/unix. -or- Unix in a Nutshell (an O Reilly book).
Crash Course in Unix For more info check out the Unix man pages -orhttp://www.cs.rpi.edu/~hollingd/unix -or- Unix in a Nutshell (an O Reilly book). 1 Unix Accounts To access a Unix system you need to have
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 information5/8/2012. Creating and Changing Directories Chapter 7
Creating and Changing Directories Chapter 7 Types of files File systems concepts Using directories to create order. Managing files in directories. Using pathnames to manage files in directories. Managing
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 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 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 information5/20/2007. Touring Essential Programs
Touring Essential Programs Employing fundamental utilities. Managing input and output. Using special characters in the command-line. Managing user environment. Surveying elements of a functioning system.
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 informationUnix/Linux: History and Philosophy
Unix/Linux: History and Philosophy History and Background Multics project Unix Linux Multiplexed Information and Computing Service Collaborative venture between General Electric, Bell Telephone Labs, and
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 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 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 informationCS 307: UNIX PROGRAMMING ENVIRONMENT REVIEW FOR EXAM 2
CS 307: UNIX PROGRAMMING ENVIRONMENT REVIEW FOR EXAM 2 Prof. Michael J. Reale Fall 2014 EXAM 2 OVERVIEW Exam 2 Material Exam 2 will cover the following: REVIEW slides from (8) to (17) (INCLUSIVE) THIS
More informationUNIX System Programming Lecture 3: BASH Programming
UNIX System Programming Outline Filesystems Redirection Shell Programming Reference BLP: Chapter 2 BFAQ: Bash FAQ BMAN: Bash man page BPRI: Bash Programming Introduction BABS: Advanced Bash Scripting Guide
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 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 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 informationAppendix A GLOSSARY. SYS-ED/ Computer Education Techniques, Inc.
Appendix A GLOSSARY SYS-ED/ Computer Education Techniques, Inc. $# Number of arguments passed to a script. $@ Holds the arguments; unlike $* it has the capability for separating the arguments. $* Holds
More informationCS 307: UNIX PROGRAMMING ENVIRONMENT KATAS FOR EXAM 1
CS 307: UNIX PROGRAMMING ENVIRONMENT KATAS FOR EXAM 1 Prof. Michael J. Reale Fall 2014 COMMAND KATA 0 Command Kata 0: Preparation First, go to ~/cs307 cd ~/cs307 Make directory dkata0 and go to it mkdir
More informationIntroduction to Linux. Fundamentals of Computer Science
Introduction to Linux Fundamentals of Computer Science Outline Operating Systems Linux History Linux Architecture Logging in to Linux Command Format Linux Filesystem Directory and File Commands Wildcard
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 informationLinux at the Command Line Don Johnson of BU IS&T
Linux at the Command Line Don Johnson of BU IS&T We ll start with a sign in sheet. We ll end with a class evaluation. We ll cover as much as we can in the time allowed; if we don t cover everything, you
More informationIntroduction to Linux Basics
Introduction to Linux Basics Part-I Georgia Advanced Computing Resource Center University of Georgia Zhuofei Hou, HPC Trainer zhuofei@uga.edu Outline What is GACRC? What is Linux? Linux Command, Shell
More informationCS/CIS 249 SP18 - Intro to Information Security
Lab assignment CS/CIS 249 SP18 - Intro to Information Security Lab #2 - UNIX/Linux Access Controls, version 1.2 A typed document is required for this assignment. You must type the questions and your responses
More informationIntroduction to Linux Part I: The Filesystem Luca Heltai
The 2nd workshop on High Performance Computing Introduction to Linux Part I: The Filesystem Luca Heltai SISSA/eLAB - Trieste Adapted from a presentation by Michael Opdenacker Free Electrons http://free-electrons.com
More information3/8/2017. Unix/Linux Introduction. In this part, we introduce. What does an OS do? Examples
EECS2301 Title Unix/Linux Introduction These slides are based on slides by Prof. Wolfgang Stuerzlinger at York University Warning: These notes are not complete, it is a Skelton that will be modified/add-to
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 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 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 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 informationIntroduction to Cygwin Operating Environment
Introduction to Cygwin Operating Environment ICT 106 Fundamentals of Computer Systems Eric Li ICT106_Pract_week 1 1 What s Cygwin? Emulates Unix/Linux environment on a Windows Operating System; A collection
More informationChapter 6. Linux File System
Chapter 6 Linux File System 1 File System File System management how to store informations on storage devices The Hierarchical Structure Types of file Common File system Tasks 2 The Hierarchical Structure
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 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 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 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 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 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 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 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 informationCS 307: UNIX PROGRAMMING ENVIRONMENT FIND COMMAND
CS 307: UNIX PROGRAMMING ENVIRONMENT FIND COMMAND Prof. Michael J. Reale Fall 2014 Finding Files in a Directory Tree Suppose you want to find a file with a certain filename (or with a filename matching
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 informationOperating Systems. Engr. Abdul-Rahman Mahmood MS, PMP, MCP, QMR(ISO9001:2000) alphapeeler.sf.net/pubkeys/pkey.htm
Operating Systems Engr. Abdul-Rahman Mahmood MS, PMP, MCP, QMR(ISO9001:2000) armahmood786@yahoo.com alphasecure@gmail.com alphapeeler.sf.net/pubkeys/pkey.htm http://alphapeeler.sourceforge.net pk.linkedin.com/in/armahmood
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 informationUNIX COMMANDS AND SHELLS. UNIX Programming 2015 Fall by Euiseong Seo
UNIX COMMANDS AND SHELLS UNIX Programming 2015 Fall by Euiseong Seo What is a Shell? A system program that allows a user to execute Shell functions (internal commands) Other programs (external commands)
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 informationExamples: Directory pathname: File pathname: /home/username/ics124/assignments/ /home/username/ops224/assignments/assn1.txt
ULI101 Week 03 Week Overview Absolute and relative pathnames File name expansion Shell basics Command execution in detail Recalling and editing previous commands Quoting Pathnames A pathname is a list
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 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 informationStd: XI CHAPTER-3 LINUX
Commands: General format: Command Option Argument Command: ls - Lists the contents of a file. Option: Begins with minus sign (-) ls a Lists including the hidden files. Argument refers to the name of a
More information5/8/2012. Specifying Instructions to the Shell Chapter 8
An overview of shell. Execution of commands in a shell. Shell command-line expansion. Customizing the functioning of the shell. Employing advanced user features. Specifying Instructions to the Shell Chapter
More informationUnix Introduction to UNIX
Unix Introduction to UNIX Get Started Introduction The UNIX operating system Set of programs that act as a link between the computer and the user. Developed in 1969 by a group of AT&T employees Various
More informationVirtual Machine. Linux flavor : Debian. Everything (except slides) preinstalled for you. https://www.virtualbox.org/
Virtual Machine Anyone have problems installing it? VM: Virtual Box - allows you to run a different operating system within the current operating system of your machine. https://www.virtualbox.org/ Linux
More informationEECS Software Tools. Lab 2 Tutorial: Introduction to UNIX/Linux. Tilemachos Pechlivanoglou
EECS 2031 - Software Tools Lab 2 Tutorial: Introduction to UNIX/Linux Tilemachos Pechlivanoglou (tipech@eecs.yorku.ca) Sep 22 & 25, 2017 Material marked with will be in your exams Sep 22 & 25, 2017 Introduction
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 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 information85321, Systems Administration Chapter 6: The shell
Chapter 6 Introduction The Shell You will hear many people complain that the UNIX operating system is hard to use. They are wrong. What they actually mean to say is that the UNIX command line interface
More informationMills HPC Tutorial Series. Linux Basics I
Mills HPC Tutorial Series Linux Basics I Objectives Command Line Window Anatomy Command Structure Command Examples Help Files and Directories Permissions Wildcards and Home (~) Redirection and Pipe Create
More informationh/w m/c Kernel shell Application s/w user
Structure of Unix h/w m/c Kernel shell Application s/w. user While working with unix, several layers of interaction occur b/w the computer h/w & the user. 1. Kernel : It is the first layer which runs on
More informationECE 471 Embedded Systems Lecture 10
ECE 471 Embedded Systems Lecture 10 Vince Weaver http://www.eece.maine.edu/ vweaver vincent.weaver@maine.edu 3 October 2013 Announcements Homework #2 has been assigned. extended until the 10th. The due
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 informationGetting your department account
02/11/2013 11:35 AM Getting your department account The instructions are at Creating a CS account 02/11/2013 11:36 AM Getting help Vijay Adusumalli will be in the CS majors lab in the basement of the Love
More informationPractical Computing-II. Programming in the Linux Environment. 0. An Introduction. B.W.Gore. March 20, 2015
Practical Computing-II March 20, 2015 0. An Introduction About The Course CMS M.2.2 Practical Computing-II About The Course CMS M.2.2 Practical Computing-II 25 credits (33.33% weighting) About The Course
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 informationINF322 Operating Systems
Galatasaray University Computer Engineering Department INF322 Operating Systems TP01: Introduction to Linux Ozan Çağlayan ocaglayan@gsu.edu.tr ozancaglayan.com Fundamental Concepts Definition of Operating
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 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 informationStudent Remote Login Procedure (see picture below): 1. Start SSH Secure Shell 2. Click the computer icon (4 th on the toolbar) 3.
Student Remote Login Procedure (see picture below): 1. Start SSH Secure Shell 2. Click the computer icon (4 th on the toolbar) 3. Enter stargate.ncc.edu in the text field labeled Host Name: 4. Enter the
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 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 informationGetting Started. Running Utilities. Shells. Special Characters. Special Characters. Chapter 2 Unix Utilities for non-programmers
Chapter 2 Unix Utilities for non-programmers Graham Glass and King Ables, UNIX for Programmers and Users, Third Edition, Pearson Prentice Hall, 2003. Original Notes by Raj Sunderraman Converted to presentation
More informationCS Fundamentals of Programming II Fall Very Basic UNIX
CS 215 - Fundamentals of Programming II Fall 2012 - Very Basic UNIX This handout very briefly describes how to use Unix and how to use the Linux server and client machines in the CS (Project) Lab (KC-265)
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 informationFilesystem and common commands
Filesystem and common commands Unix computing basics Campus-Booster ID : **XXXXX www.supinfo.com Copyright SUPINFO. All rights reserved Filesystem and common commands Your trainer Presenter s Name Title:
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 informationManage Directories and Files in Linux. Objectives. Understand the Filesystem Hierarchy Standard (FHS)
Manage Directories and Files in Linux Objectives Understand the Filesystem Hierarchy Standard (FHS) Identify File Types in the Linux System Change Directories and List Directory Contents Create and View
More informationThe UNIX Operating System. HORT Lecture 2 Instructor: Kranthi Varala
The UNIX Operating System HORT 59000 Lecture 2 Instructor: Kranthi Varala Operating Systems Image By Golftheman - Own work, CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=4558519 Operating
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 informationGetting Started with Linux
Getting Started with Linux For those with experience using Microsoft Windows there will be many familiar ways of operating in a Linux environment. There are also a few key differences. The main differences
More informationIntroduction and Overview Getting Started
Introduction and Overview Getting Started 1 Chapter-1 Introduction and Overview Getting Started Chapter Objectives Definition of operating system and the services offered by it. Types of operating system.
More informationACS Unix (Winter Term, ) Page 21
ACS-294-001 Unix (Winter Term, 2016-2017) Page 21 The Shell From the beginning, Unix was designed so that the shell is an actual program separated from the main part of the operating system. What is a
More informationLezione 8. Shell command language Introduction. Sommario. Bioinformatica. Mauro Ceccanti e Alberto Paoluzzi
Lezione 8 Bioinformatica Mauro Ceccanti e Alberto Paoluzzi Dip. Informatica e Automazione Università Roma Tre Dip. Medicina Clinica Università La Sapienza Sommario Shell command language Introduction A
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 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 information