1 The UNIX Operating System HORT Lecture 2 Instructor: Kranthi Varala
2 Operating Systems Image By Golftheman - Own work, CC BY-SA 3.0, Operating systems allow the separation of hardware management from applications/programs. This allows the applications to work across different hardware platforms, although the applications are still specific to the OS.
3 Operating Systems Library Library Virtual Memory Device Drivers File Server Image By Golftheman - org/w/index.php?curid= Kernel The Kernel is the core function of the OS and handles basic-level communication between the various processes and the hardware. Libraries provide applications with standardized access to kernel functions.
5 Terminology Terminal: Device or Program used to establish a connection to the UNIX server Shell: Program that runs on the server and interprets the commands from the terminal. Command line: The text-interface you use to interact with the shell.
6 UNIX operating system First developed in 1970s, it is a multitasking OS that supports simultaneous use by multiple users. Strengths Command-line based. Supports thousands of small programs running simultaneously. Easy to create pipelines from individual programs. Multi-user support and partitioning is baked in. Challenges Command-line based. Finding help and documentation can be onerous. Many different variants.
7 UNIX and its derivatives Image by Eraserhead1, Infinity0, Sav_vas - Levenez Unix History Diagram, Information on the history of IBM's AIX on ibm.com,
8 Application Programming Interface (API) Biggest strength is the ability to connect different programs together. Programs/Applications need to be able to communicate. A pre-defined set of methods to communicate with an application is called it s API. Each program comes with its own API.
9 Programs vs. libraries Programs/Applications: Perform a defined task that accepts one or more inputs and produces an output. Example: ls lists contents of current location. Libraries: Collection of related functions that may be used by different programs. Example: GNU Scientific library provides a set of complex math functions Users typically interact with programs, while programmers use libraries within their code. Both Programs and Libraries have APIs.
10 POSIX standards Standards defined by IEEE computer society to maintain portability between different UNIX OS s. Originally defined standard API for core processes eg., kernel level access. Later expanded to include programs and utilities used directly by the user. Net result: Common UNIX commands you learn will be usable across UNIX/ Linux/MacOS etc. UNIX and MacOS (version 10.5 and above) are POSIX-certified
11 UNIX and its derivatives Image by Eraserhead1, Infinity0, Sav_vas - Levenez Unix History Diagram, Information on the history of IBM's AIX on ibm.com,
12 GNU s not Unix GNU started as a movement to create an open-source AND free OS and set of utilities. Open-source: The source code of the software is visible to everyone. Free: No limitation on how to use/distribute the software. By default, all software is copy-righted with the rights belonging to the programmer/organization. Software can be open-source and/or free. When you write your own pipelines, be aware of the difference in these two concepts.
13 GNU/Linux OS Most Unix-like operating systems are a variant of this scheme. Linux is typically the kernel of this OS. The rest of the utilities/applications were derived from the GNU project. Vast majority of commands you will type fall into the GNU portion of the OS. This user-interfacing part of the OS is often called User space. GNU/Linux is POSIX-compliant i.e., it mostly follows POSIX with a few exceptions.
14 User vs. Kernel space User space: Set of applications/utilities that interact with the user. Also includes, the portions of the file system where these files reside AND the portion of memory (RAM) where the programs are loaded and run. Kernel space: Set of applications that form middle layer between hardware and user applications. These program operate in a separate, protected portion of the RAM.
15 UNIX file system All UNIX files, including system and user files reside in a hierarchical directory structure. The file system maintains the record of where each file resides on the hardware. The lowest level or base of this structure is called the root directory represented as / Every user has a defined home directory My home is: /home/kvarala
16 Files and Directories Files are the basic unit of storage. Eg., This presentation file. Directories are containers that hold sets of related files. Eg., Set of presentations for this course. Each file name within a directory has to be unique. UNIX is case-sensitive i.e., the file example.txt is different from the file Example.txt Directory names are also case-sensitive.
17 Files contd.. File extensions eg.,.txt or.jpg or.doc etc. have no relevance in UNIX. It is good practice for users to use a file extension that describes the file type. Use long descriptive names for your files. File name length is allowed up to 255 characters. File size limits are defined by the file system used by the OS. Current file systems support file sizes larger than the capacity of current hardware (2^63 bytes).
18 Typical structure of UNIX /bin ==> Programs/Utilities. Typically OS files. /etc ==> Administrative files. Usually, OS related. /home ==> Home directories of users. /lib ==> Libraries. OS or installed software. /mnt ==> Mounted devices. Eg., CD/DVD, USB drive. /root ==> Home for root/administrative user. /tmp ==> Temporary files. OS, software and user. /usr ==> User-space programs/utilities /var ==> System generated temporary files.
19 File paths In a shell you are always in a particular location. Default location after login is your home Eg: /home/kvarala Every file has a location on the server. Path defines the location of the file/directory. Path can be defined two ways: Absolute: Path starts from Root. Eg., /scratch/scholar/k/kvarala/week1/lecture_1.pdf Relative: Path starts from current location. Eg.,../Week2/Lecture_2.pdf Special characters:. Means current directory.. Means parent directory ~ Means home directory
20 Commands Every command is a program. UNIX philosophy is write simple programs that do one job very well. Complex functionality can be built by combining simple programs. User can add commands by writing their own program Commands are of course Case-sensitive and the OS needs to know the path to the program.
21 Command line Every word you type in the command line is interpreted by the shell as a command. If the shell cannot interpret the command it returns the error: command not found. The shell looks for the program matching the typed command in the locations defined by PATH. User can add commands by adding programs to their PATH.
22 I/O streams Each command has 3 Input/Output streams: STDIN : Standard Input is the default stream that inputs data into a command. Example: keyboard, file etc. STDOUT : Standard Output is the default output stream of the command. Example: Terminal STDERR: Standard Error is where the errors from the program are displayed: Example: Terminal
23 Anatomy of a command Let s explore commands with a easy command called cal: This command by default displays the calendar for this month with today highlighted.
24 Anatomy of a command Commands can often take arguments, which change the default settings. The argument -3 changes display to 3 months with current month in the center.
25 Anatomy of a command Argument -y displays the whole year.
26 Anatomy of a command Commands may take multiple arguments that change multiple defaults. First argument changes the month and second argument changes the year.
27 Anatomy of a command Arguments that start with - are some times called switches. Arguments that do not have a preceding - are called parameters. NOTE: This naming convention is not always followed.
28 Example UNIX commands ls stands for list. This command lists the contents of the current location. pwd stands for print working directory. This command tells you your current location in the shell. hostname gives you the name of the host that the shell resides on. who lists all the users currently logged into the server.
29 Let s explore ls ls is a basic but powerful command. It has over 50 arguments to alter its behavior. The most commonly used one is the long list format specified by the switch -l. Try typing in ls in your scratch folder: Now, try typing in ls -l
30 ls on my scratch Contents of my scratch folder Metadata about the contents Contents of my scratch folder
31 Metadata on files and directories Metadata is information about the file that are not part of the contents of the file. Three main parts to it: Ownership and access permissions Size Timestamp
32 Ownership and Access Every file/directory has a defined owner, which is one user. Permissions Owner Group Owner controls who can access the file/directory by setting the permissions. Each user is a part of one or more groups. Each file belongs to one of the groups that the user belongs to.
34 UNIX permissions Permissions First character is - for a file and d for a directory. Characters 2-4 refer to permissions the owner sets for himself. Characters 5-7 are permissions for the group listed. Characters 8-10 are permissions for the world (i.e., every other user) Common Permission settings Indicator Numeric code Read-only r-- 4 Read & execute r-x 5 Read & write rw- 6 Read, write, execute rwx 7
35 Working with directories pwd -> lists the present working directory mkdir -> makes a new directory cd -> change directory rmdir -> remove directory Try using cd with path: cd /scratch/scholar/k/kvarala cd./week1 cd../week2
36 File commands mv is the move command that moves a file. This command is also used for renaming files. rm is the remove command and will remove the file or empty directory listed as argument. cat is the catenate command that joins the contents of all files given as arguments.
37 Creating pipelines from commands The STDIN and STDOUT of each command can be redirected to combine programs together. For example, the STDOUT of one program can be sent to the STDIN of another program. We will go over examples in tomorrow s lab section.
38 Summary UNIX is a text-based, multiuser OS, that supports simultaneous execution of thousands of commands. UNIX is case-sensitive for file names and command names. Each command is a program stored as a file in specified location. Commands can be combined by redirecting I/O streams. Each file has a path that uniquely identifies its location. Access to files and directories is controlled via permissions set by the owner of the file.
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
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
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
The Unix Shell Copyright Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See http://software-carpentry.org/license.html for more information. shell shell pwd
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.
Unix/Linux Operating System Introduction to Computational Statistics STAT 598G, Fall 2011 Sergey Kirshner Department of Statistics, Purdue University September 7, 2011 Sergey Kirshner (Purdue University)
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
Introduction In this lab, you will use the Linux command line to manage files and folders and perform some basic administrative tasks. Recommended Equipment A computer with a Linux OS, either installed
Introduction to Linux Workshop 1 The George Washington University SEAS Computing Facility Created by Jason Hurlburt, Hadi Mohammadi, Marco Suarez firstname.lastname@example.org Logging In The lab computers will authenticate
An to Unix Power Tools Randolph Langley Department of Computer Science Florida State University August 27, 2008 History of Unix Unix Today Command line versus graphical interfaces to COP 4342, Fall History
AN INTRODUCTION TO UNIX Paul Johnson School of Mathematics September 18, 2011 OUTLINE 1 INTRODUTION Unix Common Tasks 2 THE UNIX FILESYSTEM Moving around Copying, deleting File Permissions 3 SUMMARY OUTLINE
Oxford University Computing Services Getting Started with Unix Unix c3.1/2 Typographical Conventions Listed below are the typographical conventions used in this guide. Names of keys on the keyboard are
*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
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
Chap2: Operating-System Structures Objectives: services OS provides to users, processes, and other systems structuring an operating system how operating systems are designed and customized and how they
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.)
The UNIX File System Magnus Johansson (May 2007) 1 UNIX file system A file system is created with mkfs. It defines a number of parameters for the system as depicted in figure 1. These paremeters include
EECS 2031 - Software Tools Lab 2 Tutorial: Introduction to UNIX/Linux Tilemachos Pechlivanoglou (email@example.com) Sep 22 & 25, 2017 Material marked with will be in your exams Sep 22 & 25, 2017 Introduction
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
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
IT Essentials II: NOS Linux Labs Using Knoppix 1 IT Essentials II Linux Labs Using Knoppix Agenda Course Overview Knoppix Lab Map Knoppix Overview Lab: Basic System Administration in Knoppix v2 2 IT Essentials
UNIX Operating System 1 Lecture Notes Overview Unlike many operating systems, UNIX is not limited to specific computers using a particular microprocessor as a CPU. Instead, UNIX systems run on all sizes
GNU/Linux Course Lesson 1 Puria Nafisi Azizi @pna http://netstudent.polito.it Netstudent is an students volunteer association within the Politecnico di Torino. Is build of different people and students
Introduction to Shell Scripting Evan Bollig and Geoffrey Womeldorff Presenter Yusong Liu Before we begin... Everyone please visit this page for example scripts and grab a crib sheet from the front http://www.scs.fsu.edu/~bollig/techseries
Unix Basics Benjamin S. Skrainka University College London July 17, 2010 Overview We cover basic Unix survival skills: Why you need some Unix in your life How to get some Unix in your life Basic commands
M2PGER 2013-2014 FORTRAN programming General introduction Virginie DURAND and Jean VIRIEUX 1 Why learning programming??? 2 Why learning programming??? ACQUISITION numerical Recording on magnetic supports
Filesystem Hierarchy Operating systems I800 Edmund Laugasson firstname.lastname@example.org There has been used materials from Margus Ernits, Katrin Loodus when creating current slides. Current document
Lezione 8 Bioinformatica Mauro Ceccanti e Alberto Paoluzzi Esercitazione Introduzione al linguaggio di shell Dip. Informatica e Automazione Università Roma Tre Dip. Medicina Clinica Università La Sapienza
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
Advanced Linux Commands & Shell Scripting Advanced Genomics & Bioinformatics Workshop James Oguya Nairobi, Kenya August, 2016 Man pages Most Linux commands are shipped with their reference manuals To view
Content : by Dr. B. Boufama School of Computer Science University of Windsor Instructor: Dr. A. Habed email@example.com http://cs.uwindsor.ca/ adlane/60-256 Content Content 1 Introduction 2 3 Introduction
Practical 4 Linux Commands: Working with Directories 1. pwd: pwd stands for Print Working Directory. As the name states, command pwd prints the current working directory or simply the directory user is,
Quintessential School Systems Session C Linux Presented by Bill Genske Gary Jackson Copyright Quintessential School Systems, 2009 All Rights Reserved 867 American Street --- Second Floor --- San Carlos,
310/1779-4 Fourth Workshop on Distributed Laboratory Instrumentation Systems (30 October - 24 November 2006) Linux Refresher (1) Razaq Babalola IJADUOLA These lecture notes are intended only for distribution
Software I: Utilities and Internals Lecture 3 File System Commands The File System A file in UNIX is a sequence of bytes. UNIX imposes no structure in a file and there is no extension implicit in a file
A Brief Introduction to the Linux Shell for Data Science Aris Anagnostopoulos 1 Introduction Here we will see a brief introduction of the Linux command line or shell as it is called. Linux is a Unix-like
Galatasaray University Computer Engineering Department INF322 Operating Systems TP01: Introduction to Linux Ozan Çağlayan firstname.lastname@example.org ozancaglayan.com Fundamental Concepts Definition of Operating
Unix Basics Lecture 14 UNIX Introduction The UNIX operating system is made up of three parts; the kernel, the shell and the programs. The kernel of UNIX is the hub of the operating system: it allocates
Essential Unix (and Linux) for the Oracle DBA Revision no.: PPT/2K403/02 Architecture of UNIX Systems 2 UNIX System Structure 3 Operating system interacts directly with Hardware Provides common services
Basic Linux (Bash) Commands Hint: Run commands in the emacs shell (emacs -nw, then M-x shell) instead of the terminal. It eases searching for and revising commands and navigating and copying-and-pasting
CHEM5302 Fall 2015: Introduction to Maestro and the command line Ronald Levy October 29, 2015 1 Introduction As this course has evolved through the years, the landscape of computational hardware and software
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
CSE Linux VM For Microsoft Windows Based on opensuse Leap 42.2 Dr. K. M. Flurchick February 2, 2017 Contents 1 Introduction 1 2 Requirements 1 3 Procedure 1 4 Usage 3 4.1 Start/Stop.................................................
Outline 1 Operating Systems overview & concepts files and processes in UNIX the platform and os modules 2 Turtle Graphics importing the turtle module drawing a spiral colors with turtle 3 Summary + Assignments
An Introduction to Using the Command Line Interface (CLI) to Work with Files and Directories Mac OS by bertram lyons senior consultant avpreserve AVPreserve Media Archiving & Data Management Consultants
CSc33200: Operating Systems, CS-CCNY, Fall 2003 Jinzhong Niu September 26, 2003 Nachos Overview Operating Systems is one of the fundamental courses for a student who majors in computer software. A good
Overview Shell programming is a way of taking several command line instructions that you would use in a Unix command prompt and incorporating them into one program. There are many versions of Unix. Some
Introduction to Unix and Linux Workshop 1: Directories and Files Genomics Core Lab TEXAS A&M UNIVERSITY CORPUS CHRISTI Anvesh Paidipala, Evan Krell, Kelly Pennoyer, Chris Bird Genomics Core Lab Informatics
CS395T: Introduction to Scientific and Technical Computing Instructors: Dr. Karl W. Schulz, Research Associate, TACC Dr. Bill Barth, Research Associate, TACC Outline Continue with Unix overview File attributes
SSH Secure Shell Client 1 Introduction An SSH Secure Shell Client is a piece of software that allows a user to do a number of functions. Some of these functions are: file transferring, setting permissions,
Introduction Into Linux Lecture 1 Johannes Werner WS 2017 Table of contents Introduction Operating systems Command line Programming Take home messages Introduction Lecturers Johannes Werner (email@example.com)
Concepts Unix directories Important Unix file commands man, pwd, ls, mkdir, cd, cp, mv File and directory access rights through permission settings Using chmod to change permissions Other important Unix
Operating Systems Linux 1-2 Measurements Background material Introduction The Linux measurements were designed to allow you to have an impression about the administration of Linux severs along with providing
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
CSCI2467: Systems Programming Concepts Class activity: bash shell literacy Instructor: Matthew Toups Fall 2017 Today 0 Shells History Usage Scripts vs. Programs 1 Bash shell: practical uses for your systems
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
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
GNU/ Linux Basics Topics Installation Basics of Using GNU/ Linux Administration Tools Installation Installing Using the GUI Disc Partitioning Allocation of swap space Selection of packages to install Configuring
A Hands-On Tutorial: RNA Sequencing Using Computing February 11th and 12th, 2016 1st session (Thursday) Preliminaries: Linux, HPC, command line interface Using HPC: modules, queuing system Presented by:
Research. We make it happen. Unix Basics Presented by: Patton Fast User Support Group help-line: firstname.lastname@example.org 612-626-0802 personal: email@example.com 612-625-6573 Outline I. Warnings! II. III. IV.
Chapter 1. The UNIX Operating System Introduction This chapter introduces you to the UNIX operating system. We first look at what is an operating system and then proceed to discuss the different features
How to Restrict a Login Shell Using Linux Namespaces Firejail is a SUID sandbox program that reduces the risk of security breaches by restricting the running environment of untrusted applications using
a) Write a shell script that displays a list of all the files in the current directory to which the user has read, write and execute permissions. b) Develop an interactive script that asks for a word and
CSC 2500: Unix Lab Fall 2016 IO Redirection Mohammad Ashiqur Rahman Department of Computer Science College of Engineering Tennessee Tech University Agenda Standard IO IO Redirection Pipe Various File Processing
File System yihshih Files % ls l d rwx--x--x 7 wutzh gcs 1024 Sep 22 17:25 public_html File type File access mode # of links File user owner File group owner File size File last modify time 2 File name
C++ Programming on Linux What is Linux? CS 2308 Spring 2017 Jill Seaman Slides 14-end are for your information only, you will not be tested over that material. 1 l an operating system l Unix-like l Open
CSCI 503: Operating Systems File System (Chapters 16 and 17) Fengguang Song Department of Computer & Information Science IUPUI File System (FS) Highlights File system is the most visible part of OS From
Process Management! 1 Goals of this Lecture! Help you learn about:" Creating new processes" Programmatically redirecting stdin, stdout, and stderr" (Appendix) communication between processes via pipes"
Linux Essentials Linux Essentials is a professional development certificate program that covers basic knowledge for those working and studying Open Source and various distributions of Linux. Exam Objectives
CpSc 1111 Lab 1 Introduction to Unix Systems, Editors, and C Welcome! Welcome to your CpSc 111 lab! For each lab this semester, you will be provided a document like this to guide you. This material, as
Lecture 2b Pathnames, files, special characters in filenames, and file permissions. COP 3353 Introduction to UNIX, FALL 2013 Files Files A well defined repository of information Program or component of
Threads Thread Concept Multithreading Models User & Kernel Threads Pthreads Threads in Solaris, Linux, Windows 2/13/11 CSE325 - Threads 1 Threads The process concept incorporates two abstractions: a virtual
Policy vs. Mechanism CSE 380 Computer Operating Systems Instructor: Insup Lee and Dianna Xu University of Pennsylvania Fall 2003 Lecture Note: Protection Mechanisms q Access control policy is a specification
Operating Systems, Unix Files and Commands SEEM 3460 1 Major Components of Operating Systems (OS) Process management Resource management CPU Memory Device File system Bootstrapping SEEM 3460 2 Programs
UNIX Basics UNIX Basics CIS 218 Oakton Community College History UNIX was invented in 1969 at AT&T Bell Labs Ken Thompson and Dennis Ritchie are credited as the original architects and developers of C.
OS Services & System Calls James Moscola Department of Engineering & Computer Science York College of Pennsylvania Based on Operating System Concepts, 9th Edition by Silberschatz, Galvin, Gagne Operating
Helpful Tips for Labs CS140, Spring 2015 Linux/Unix Commands Creating, Entering, Changing Directories to Create a Directory (a Folder) on the command line type mkdir folder_name to Enter that Folder cd
The Classical OS Model in Unix Nachos Exec/Exit/Join Example Exec parent Join Exec child Exit SpaceID pid = Exec( myprogram, 0); Create a new process running the program myprogram. int status = Join(pid);
Linux Operating System IT250 Unit 1 Chapters 1, 2, and 3 An Introduction to Linux Linux Operating Systems Wednesday, 9:00 am 1:20 pm Attendance is Mandatory! Each class may begin with a quiz from previous
Chapter 2 Software Components Objectives Describe historical milestones for three popular operating systems Describe the architecture of common PC operating systems Describe the functions of an operating
IBM z Systems Development and Test Environment Tools User's Guide IBM ii IBM z Systems Development and Test Environment Tools User's Guide Contents Chapter 1. Overview......... 1 Introduction..............
Oregon State University School of Electrical Engineering and Computer Science CS 261 Recitation 1 Spring 2011 Outline Using Secure Shell Clients GCC Some Examples Intro to C * * Windows File transfer client: