Introduction to UNIX.

Slides:



Advertisements
Similar presentations
A Guide to Unix Using Linux Fourth Edition
Advertisements

Chapter One The Essence of UNIX.
Guide To UNIX Using Linux Third Edition
Spring 2007Introduction to OS1 IT 3423: Operating System Concepts and Administration Instructor: Wayne (Weizheng) Zhou
Guide To UNIX Using Linux Third Edition
Introduction to Unix (CA263) Introduction to Shell Script Programming By Tariq Ibn Aziz.
CS 497C – Introduction to UNIX Lecture 1: Getting Started Chin-Chih Chang
UNIX chapter 03 Getting Started Mr. Mohammad Smirat.
Cambodia-India Entrepreneurship Development Centre - : :.... :-:-
Systems Software Operating Systems.
The University of Akron Summit College Business Technology Department Computer Information Systems 2440: 145 Operating Systems Introduction to UNIX/Linux.
What is Unix Prepared by Dr. Bahjat Qazzaz. What is Unix UNIX is a computer operating system. An operating system is the program that – controls all the.
Operating System.
Lesson 4 Computer Software
© Paradigm Publishing Inc. 4-1 Chapter 4 System Software.
CST334 Unix & X Window System
Overview of Linux CS3530 Spring 2014 Dr. José M. Garrido Department of Computer Science.
Chapter 4 System Software.
Introduction to Shell Script Programming
Introduction to Unix/Linux Chapter One The Essence of UNIX.
UNIX Unbounded 5th Edition Amir Afzal Chapter 3 Getting Started
Module 1 Introduction to UNIX/Linux
CENT 305 Information Systems Security Linux Introduction.
CS 497C – Introduction to UNIX Lecture 7: General-Purpose Utilities Chin-Chih Chang
Chapter 2: Getting Started Logon to Logout. In this chapter … Logging on The Shell Superuser Getting Help Logging off.
CS 390 Unix Programming Summer Unix Programming - CS 3902 Course Details Online Information Please check.
CS 390 Unix Programming Environment Summer Suchindra Rengan - CS3902 Course Details Instructors Suchindra Rengan – ‘sachin’ ( Section 001)
Introduction to Unix (CA263) Getting Started By Tariq Ibn Aziz.
Agenda Getting Started: Using Unix Unix Structure / Features Elements of the Unix Philosophy Unix Command Structure Command Line Editing Online Unix Command.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Lesson 2-Touring Essential Programs. Overview Development of UNIX and Linux. Commands to execute utilities. Communicating instructions to the shell. Navigating.
Computers & Operating Systems
Introduction to Programming Using C An Introduction to Operating Systems.
Unix – Linux CS3353 Ssystem Administration. OS The Operating System – Acts as the interface to all software, hardware, and users of a computer. – Requires.
Page 1 Printing & Terminal Services Lecture 8 Hassan Shuja 11/16/2004.
© Paradigm Publishing, Inc. 4-1 Chapter 4 System Software Chapter 4 System Software.
Lesson 3-Touring Utilities and System Features. Overview Employing fundamental utilities. Linux terminal sessions. Managing input and output. Using special.
Basic UNIX Concepts. Why We Need an Operating System (OS) OS interacts with hardware and manages programs. A safe environment for programs to run is required.
Introduction to UNIX CS 2204 Class meeting 1 *Notes by Doug Bowman and other members of the CS faculty at Virginia Tech. Copyright
Introduction to UNIX CS465. What is UNIX? (1) UNIX is an Operating System (OS). An operating system is a control program that allocates the computer's.
BABCA Software Operating Systems (OS) aka Systems Software A set of instructions that coordinate all the activities among computer hardware resources.
Agenda Overview of Seneca Computer System File Servers / Student Computer Accounts Telnet application How to Logon to Learn / Phobos accounts How to Change.
BIF713 Introduction to Linux. Agenda Getting Started: Using Linux Unix and Linux - Structure / Features Elements of the Linux Philosophy Linux Command.
UNIX U.Y: 1435/1436 H Operating System Concept. What is an Operating System?  The operating system (OS) is the program which starts up when you turn.
Copyright © 2003 by Prentice Hall 1 Computers: Tools for an Information Age Chapter 3 Operating Systems: Software in the Background BSM025 Computers.
Chapter 2 Operating Systems
Lecture-7 Introduction to DOS. Introduction to UNIX/LINUX OS.
Chapter 1: Introduction to Computers and Programming
Overview of Linux Fall 2016 Dr. Donghyun Kim
Section 2.1 Section 2.2 Identify hardware
Discovering Computers 2012: Chapter 8
Welcome to Linux Chap#1 Hanin Abdulrahman.
Computer Software.
Guide To UNIX Using Linux Third Edition
Introduction to Operating System (OS)
Chapter 1 The Essence of UNIX and Linux
Chapter 1: Introduction to Computers and Programming
(Chapter 2) John Carelli, Instructor Kutztown University
Unix : Introduction and Commands
Chapter Four UNIX File Processing.
Introduction to Computer Software
Linux Professor Sabol.
UNIX and Shell Programming (06CS36)
Welcome to Linux Chap#1 Hanin Abdulrahman.
UNIX and Shell Programming (06CS36)
Welcome to Linux Chap#1.
An Introduction to Operating Systems
Windows Operating System
Chapter 1: Introduction to Computers and Programming
Presentation transcript:

Introduction to UNIX

Preface UNIX was introduced to the world by Bell Labs in the late 1970’s. It was intended to be a powerful operating system that could be ported to variety of hardware environments. Over years, UNIX has gone through many editions, versions, and changes; but never lost its main feature – power.

UNIX was designed as an operating system for programmers and scientists who work closely with the hardware; it was never intended to be “friendly”. UNIX survived as a nice product, highly useful in the scientific and engineering community, large corporations, academia, and most importantly, as the operating system of choice for the Internet.

Chapter 1 Introduction

Several features of UNIX that made it very popular: Portable UNIX found on more hardware platforms than any other OS. It was developed using the C language. Because C programs are easily moved from one hardware to another, it is relatively simple to port it to different environment. All that is needed is a standard C compiler.

Multiuser In environment where hundreds of users connect to the Internet daily, OS must be able to support multiple users. The UNIX design allows multiple users to concurrently share hardware and software. The UNIX resource-sharing algorithms allow them to share the resources while at the same time preventing any one user from locking out others. It is very democratic OS, everyone gets an equal chance at the resources.

Multitasking Multitasking is an OS feature that allows a user to run more than one job at a time. Networking UNIX was not originally a networking OS. Networking was added after the split between BSD UNIX and AT&T UNIX. Both developers incorporated networking into the heart of OS. Networking allows users from one location to log into system at other sites and execute any UNIX command.

UNIX treats I/O devices like ordinary files. Organized File System UNIX has a very organized file and directory system that allow users to organize and maintain files. Device Independence UNIX treats I/O devices like ordinary files. The input to a program can come from any device or file and output of the program can go to any device or file. The source and destination for file I/O is easily controlled through a UNIX design feature redirection. IX

Utilities Productivity is directly proportionate to the software available on a system. There are more than 100 utilities that a user can use in a UNIX system. Services In a large user environment, specially designated administrators monitor the system and help users. They need support utilities to work with system resources such as disk and security access. UNIX includes the support utilities for the system administration and control.

Computer System A computer system is a combination of hardware and software that lets us work with a computer. The hardware is the physical element. The software is a set of programs (instructions) that allow hardware to do its job.

Components of Computer Hardware The hardware is the combination of devices that can be seen or touched.

Software The software is the combination of programs. Consists of a set of programs that serve the computer itself: OS and a set of support programs, such as disk copy. Consists of programs that are written to solve user’s problems. They range from word processors to specialized applications.

The Operating System The OS is a special category of system software that manages all the operating facets of the computer. UNIX is an OS. It is different from other common OS’s such as DOS, Windows, and the Mac OS. OS makes the computer what it is. Sometimes the term OS refers to all system software. Sometimes it refers only to the central kernel. We include in OS its primary tasks: resource allocation and scheduling, data management including file I/O, and system security.

UNIX Environment UNIX is used in three different computing environments: Stand-alone personal environment. Time-sharing environment. Client/server systems.

Personal Environment Many users are installing UNIX on their personal computers. This trend to personal systems accelerated in the mid-1990’s with the availability of Linux, a free UNIX system.

Time-sharing Environment In a time-sharing environment, many users are connected to one or more computers. The terminals are often non-programmable. The output devices and auxiliary storage devices are shared by all of the users

The Time-Sharing Environment

Client/Server Systems A client/server environment splits the computing function between a central computer and users’ computers. The users are given personal computers or workstations so that some of the computing responsibility can be moved off the central computer and assigned to workstations. The users’ workstations are called the client. The central computer is knows as a server. The work is shared between a central computer and users’ computers, therefore response time and monitor displays are faster.

The Client/Server Environment

Unix Structure UNIX consists of four major components: the kernel, the shell, a standard set of utilities, and application programs.

The Kernel The kernel is the heart of the UNIX system. It contains the two most basic parts of OS: process control and resource management. All other components of the system call on the kernel to perform these services for them.

The Shell The shell is the part of UNIX that is most visible to the user. It receives and interprets the commands entered by the user. It is the part that we as users get to know the most. If the command requires a utility, the shell requests that the kernel executes that utility. If the command requires an application program, the shell requests that it be run.

The Shell (cont) There are two major parts of a shell. The first is the interpreter that reads the commands and works with the kernel to execute them. The second is a programming capability that allows programmers to write a shell script. A shell script is a file that contains shell commands that perform a useful function. It is also known as a shell program.

The Shell (cont) There are three standard shells used in UNIX today. The Bourne shell, developed by Steve Bourne at the AT&T, is the oldest. An enhanced version of the Bourne shell, called Bash (Bourne again shell), is used in Linux. The C shell, developed in Berkeley by Bill Joy, receives its name from the fact that its commands were supposed to look like C statements. A version of C shell, tcsh, is used in Linux. The Korn shell, developed by David Korn at the AT&T, is the newest.

Some Standard UNIX Shells

Utilities Applications A utility is a standard UNIX program that provides a support process for users. Three common utilities are text editors, search programs, and sort programs. Applications Applications are programs that are not a standard part of UNIX. Written by system administrators, or users, they provide an extended capability to the system. Many standard utilities started out as applications.

Accessing UNIX To begin, you need to log in to the system. Then you enter commands and the system responds. When you finished you work, you log out. The time spend working with the system is known as a session.

User ID You and your account are identified by a special code known as a user id. Password A password is a secret code that you supply to the server and that is known only to you. UNIX encrypts passwords when it stores them in the server so that no one can figure out what they are.

Interactive Session The interactive session contains three steps: login, interaction, and logout.

Interactive Session (cont) The default system prompt for bourne, bash, and korn shells is a dollar sign ($). For the C and tcsh shells, the prompt is a percentage sign (%).

Commands The basic of all UNIX interaction is the command. They are generally a single line entered at the command line prompt that cause a program to be executed. They can be included in executable files to form scripts. All UNIX commands apply an action to some input data and create some output data. The input usually comes from keyboard; the output is usually shown on the monitor (screen).

Command Source and Destination

Command Syntax

The date Command The date command displays the system date and the time.

The calendar Command The calendar command , cal, displays the calendar for a specified month or a year. It has no options.

The who Command The who command displays all the users currently logged into the system.

The passwd Command The password command, passwd, is used to change your password. It has no options or attributes.

The echo Command The echo command copies its argument back to the terminal.

The man Command The man command displays online documentation. -k option will display information about a topic.

The lpr Command The common print utility is line printer (lpr).

The tty Command The tty command is used to show the name of the terminal you are using.

The clear Command The clear command clears the screen and puts the cursor at the top.

The stty Command The set terminal (stty) command sets or unsets selected terminal I/O options. When the terminal is not responding properly, the set terminal command can be used to reconfigure it.

Set Terminal with Arguments Set Erase and Kill (ek) The ek argument sets the default erase (Delete key ctrl+h) and kill (ctrl+c) to their defaults. Set terminal to General Configuration (sane) The sane argument sets the default terminal configuration to a reasonable setting that can be used with majority of terminals. stty sane Set Erase key (erase) By default, the Erase key is ctrl+h. We can reconfigure the keyboard to use another key as the Delete key. stty erase ^e

Set Terminal with Arguments (cont) Set Kill (kill) The Kill key deletes a whole line. By default it is ctrl+u. We can change it using the set terminal command with the kill argument stty kill 9 It is not recommended to use a single key. Set Interrupt Key (intr) The interrupt key interrupts or suspends a command. By default it is ctrl+c. It can be reset using intr argument stty intr ^9 There are many more stty command options and arguments. Many of them are applicable only to superusers. uma

The script Command The script command can be used to record an interactive session. To stop recording, key exit. typescript is a default file name. We can pass a file name as an argument script myfilename

The uname Command UNIX system stores data about itself. To see these data, we can use the uname command.

The bc Command bc command turns UNIX into a calculator. To terminate it, we key ctrl+d. scale expression sets the number of digits after the decimal point. The base of the calculation can be changed by setting the input base (ibase) and the output base (obase).