What is UNIX? A Little Bit about UNIX and User Interfaces. Adapted from Practical Unix and Programming Hunter College

Similar documents
CPS221 Lecture: Operating System Functions

5/20/2007. Touring Essential Programs

Getting Started. Logging In and Out. Adapted from Practical Unix and Programming Hunter College

About shells and command lines

Using Commands. Introduction to Unix. May 24, 2008 Rabat, Morocco. Hervey Allen

CPS221 Lecture: Operating System Functions

Chap2: Operating-System Structures

Unix/Linux: History and Philosophy

CSCI 2132 Software Development. Lecture 3: Unix Shells and Other Basic Concepts

CS 390 Chapter 2 Homework Solutions

Practical Computing-II. Programming in the Linux Environment. 0. An Introduction. B.W.Gore. March 20, 2015

Unix Shells and Other Basic Concepts

Operating Systems. Copyleft 2005, Binnur Kurt

Operating Systems 3. Operating Systems. Content. What is an Operating System? What is an Operating System? Resource Abstraction and Sharing

EECS2301. Lab 1 Winter 2016

Today. Operating System Evolution. CSCI 4061 Introduction to Operating Systems. Gen 1: Mono-programming ( ) OS Evolution Unix Overview

5/8/2012. Specifying Instructions to the Shell Chapter 8

Today. Operating System Evolution. CSCI 4061 Introduction to Operating Systems. Gen 1: Mono-programming ( ) OS Evolution Unix Overview

Introduction to Linux. Fundamentals of Computer Science

COMP 4/6262: Programming UNIX

Lecture 3. Unix. Question? b. The world s best restaurant. c. Being in the top three happiest countries in the world.

Using LINUX a BCMB/CHEM 8190 Tutorial Updated (1/17/12)

Common UNIX Commands. Unix. User Interfaces. Unix Commands Winter COMP 1270 Computer Usage II 9-1. Using UNIX. Unix has a command line interface

Introduction to the Shell

Introduction to Shell Scripting

UNIX Kernel. UNIX History

Scripting Languages Course 1. Diana Trandabăț

Lecture # 2 Introduction to UNIX (Part 2)

CS370 Operating Systems

UNIX 2 OPERATING SYSTEM

History. Terminology. Opening a Terminal. Introduction to the Unix command line GNOME

CISC 220 fall 2011, set 1: Linux basics

Examples: Directory pathname: File pathname: /home/username/ics124/assignments/ /home/username/ops224/assignments/assn1.txt

Linux shell scripting intro/review

CS420: Operating Systems. OS Services & System Calls

Linux Systems Administration Getting Started with Linux

The Online Unix Manual

UNIX. The Very 10 Short Howto for beginners. Soon-Hyung Yook. March 27, Soon-Hyung Yook UNIX March 27, / 29

About the Presentations

GNU/Linux Course Lesson 1. Puria Nafisi

Introduction: What is Unix?

Lezione 8. Shell command language Introduction. Sommario. Bioinformatica. Mauro Ceccanti e Alberto Paoluzzi

Vi & Shell Scripting

Chapter 9. Shell and Kernel

Bioinformatics? Reads, assembly, annotation, comparative genomics and a bit of phylogeny.

Introduction to Linux

CSE II-Sem)

Chapter 2: Operating-System Structures. Operating System Concepts 9 th Edit9on

EE516: Embedded Software Project 1. Setting Up Environment for Projects

Lezione 8. Shell command language Introduction. Sommario. Bioinformatica. Esercitazione Introduzione al linguaggio di shell

The Slide does not contain all the information and cannot be treated as a study material for Operating System. Please refer the text book for exams.

Overview of the UNIX File System

3/8/2017. Unix/Linux Introduction. In this part, we introduce. What does an OS do? Examples

Introduc+on. General Information. General Information. General Information. General Information. General Information

Unix System Architecture, File System, and Shell Commands

Evolutionary Genetics. LV Lecture with exercises 6KP. Bioinformatics. Jean-Claude Walser

Chapter 2 Software Components

Introduction to Linux

Chapter 2: Operating-System Structures

System Programming. Unix Shells

5/8/2012. Exploring Utilities Chapter 5

Linux for Beginners. Windows users should download putty or bitvise:

System Administration

Linux. An introduction. Aurélien Villani 01/2018

Introduction To Linux. Rob Thomas - ACRC

INTRODUCTION TO UNIX

Introduction to Linux. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University

Linux Command Line Interface. December 27, 2017

Introduction to Linux

Operating systems fundamentals - B02

31268_WEB SYSTEMS LECTURE 1. Operating Systems Part 1

Lec 1 add-on: Linux Intro

CSE 390a Lecture 1. introduction to Linux/Unix environment

Processes. Shell Commands. a Command Line Interface accepts typed (textual) inputs and provides textual outputs. Synonyms:

Introduction. Let s start with the first set of slides

Introduction to Unix: Fundamental Commands

Perl and R Scripting for Biologists

Linux Operating System

Operating-System Structures

INF322 Operating Systems

Prof. Navrati Saxena TA: R. Sachan

Review. Preview. Linux System Roadmap (Libraries)

Mac OS X Part 2. The University of Utah Student Computing Labs Macintosh Support

ACS Unix (Winter Term, ) Page 21

UNIX COMMANDS AND SHELLS. UNIX Programming 2015 Fall by Euiseong Seo

EECS 2031E. Software Tools Prof. Mokhtar Aboelaze

Linux & Shell Programming 2014

CSE 391 Lecture 1. introduction to Linux/Unix environment

Shells. A shell is a command line interpreter that is the interface between the user and the OS. The shell:

Introduction to UNIX. Logging in. Basic System Architecture 10/7/10. most systems have graphical login on Linux machines

Table 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

A computer is an electronic device, operating under the control of instructions stored in its own memory unit.

Chapter 2: System Structures. Operating System Concepts 9 th Edition

Grep and Shell Programming

Lab #8: Introduction to UNIX and GMT

CSCI 211 UNIX Lab. Shell Programming. Dr. Jiang Li. Jiang Li, Ph.D. Department of Computer Science

Lecture 2 Operating System Structures (chapter 2)

Compiling C/C++ programs

Introduction to Linux Part 1. Anita Orendt and Wim Cardoen Center for High Performance Computing 24 May 2017

Shell Programming Systems Skills in C and Unix

Transcription:

What is UNIX? A Little Bit about UNIX and User Interfaces Adapted from Practical Unix and Programming Hunter College Copyright 2006 Stewart Weiss

What is UNIX? It is a multi-user, multi-tasking operating system. An operating system is a program or collection of programs that manage the computer's hardware and software resources and provide an interface so that people can use the computer. Operating systems do things like managing memory, managing I/O devices, deciding which programs should run, and protecting users' data from each other. 2 Comp 190 Scripting Languages

What does "multi-user" mean? Multi-user: when two or more people can work on the same computer at the same time, using different terminals. A terminal is a device with a monitor and a keyboard. (The concept is more complex than this, but for now think of it this way. There are also special windows called pseudo-terminals.) 3 Comp 190 Scripting Languages

What about multi-tasking? Multi-tasking: when two or more programs can be running on the computer at the same time. This does not imply that there has to be more than one processor; they can time-share the processor in the same way that people time-share a vacation house. Even modern Windows and Macintosh operating systems support multi-tasking. (Take a look at the list of applications and processes in the Windows "Task Manager".) 4 Comp 190 Scripting Languages

Why all the fuss about UNIX? UNIX is a professional operating system that lets you do sophisticated tasks easily. It lets you customize your work environment and create new commands. It is inherently very secure because of the way it was designed (but it is not immune to attacks). There are free versions of it that are easily obtained. Linux is one of the most popular versions of UNIX that can be obtained for free, but not the only one! 5 Comp 190 Scripting Languages

Why did UNIX become popular? UNIX was unique in that it was: Portable: It was easily modified to work on new types of computers as they came into existence (because it was written in C, a novel idea back then.) Very Small: The original version of Unix was about 10,000 lines of C, and about 1,000 lines of assembler. (Windows Vista had about 50,000,000 lines of code.) Free: It was distributed to universities and research laboratories for free by AT&T. Innovative: It had many features that were not part of any other operating systems. 6 Comp 190 Scripting Languages

User interfaces: The UNIX advantage Every computer operating system provides one or more user interfaces. A user interface is the part of the operating system that allows the user to direct the operating system, i.e., to tell it what to do. The primary user interface of the Mac OS and Windows is a graphical user interface (GUI), in which you use a point-and-click device (e.g., mouse) and keyboard to direct the operating system. 7 Comp 190 Scripting Languages

The UNIX user interface In contrast, you tell UNIX what to do by typing commands in a command window, like the DOS cmd.exe window. There is no need for a mouse. This type of user interface is called a command-line interpreter or interface (CLI). Commands are essentially imperative verbs, always in lowercase letters, like "logout", "sort" or "date". You can sometimes figure out what they do by their names. 8 Comp 190 Scripting Languages

UNIX, in a nutshell The main component of any operating system is the part that controls the hardware and software resources of the computer. In UNIX, it is called the kernel, because like the kernel of a nut, it is hidden away. kernel shell The command-line interface is the visible part, but it hides the inner workings of the kernel. It is called a shell in UNIX. 9 Comp 190 Scripting Languages

Shells There are many different shells in UNIX, such as: the Bourne shell (sh), the C-shell (csh), the Korn shell (ksh), the T C-Shell (tcsh), the Z shell (zsh), and the Bourne-Again Shell (bash) bash is a very popular shell among UNIX users. 10 Comp 190 Scripting Languages

What the shell looks like All shells work in the same way, displaying a prompt, waiting for you to type, and responding: $ ls my_directory analysis rawdata trials $ date Mon Jul 14 21:02:36 EDT 2014 $ whoami sweiss (What you type is colored red ONLY IN THE SLIDES in order to distinguish between entered commands and UNIX's response.) 11 Comp 190 Scripting Languages

You'd rather use a GUI? You may think that having to type on the keyboard is a minus, not a plus. It is not. For one, UNIX has hundreds of commands. They are much more powerful than those you find in a system such as Windows. Suppose files_to_copy is the name of a file that has the names of files that you want to back up. Try doing this in a GUI: cp `cat files_to_copy` backupdir which copies all files whose names are in files_to_copy into the directory backupdir. 12 Comp 190 Scripting Languages

Composing commands (1) UNIX also lets you compose commands and create your own commands by writing shell scripts, because the shells are also programming language interpreters! UNIX shells let you pipe the output of one command into another, as in this example: who awk '{print $1}' sort uniq which prints a sorted list of names of users currently logged into the computer, and as in cat f1 f2 f3 sort -u which sorts files f1, f2, and f3 and removes duplicate lines. 13 Comp 190 Scripting Languages

Shell Scripts The previous examples used a simple but powerful command composition operator called a pipe. Later you will learn more about pipes and other means of altering the flow of inputs and outputs in shell scripts. Scripts are lists of shell commands that are executed all at once, like batch files in DOS. Scripts can be extremely powerful, as you will discover. 14 Comp 190 Scripting Languages

UNIX Graphical User Interfaces Modern UNIX systems for desktop computers, such as Linux, also come bundled with one or more desktop environments with windows, menus, and a GUI. GNOME and KDE were the most prevalent desktops for Linux. There are many others now. Within the desktop, UNIX looks like a typical Windows or Macintosh machine, but this is just appearance. It is still UNIX underneath. 15 Comp 190 Scripting Languages

Linux Desktop Environments This is one of my desktops, with a VMD window on display. It has the look and feel of a Mac or Windows computer. 16 Comp 190 Scripting Languages