introduction to unix - notesinterpreter.in · introduction to unix harish kumar .h .c assistant...

27
Introduction to UNIX Harish Kumar .H .C Assistant Professor Department of CSE

Upload: others

Post on 28-May-2020

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Introduction to UNIX - notesinterpreter.in · Introduction to UNIX Harish Kumar .H .C Assistant Professor Department of CSE. What is UNIX? •UNIX is an operating system is a set

Introduction to UNIX Harish Kumar .H .C

Assistant Professor

Department of CSE

Page 2: Introduction to UNIX - notesinterpreter.in · Introduction to UNIX Harish Kumar .H .C Assistant Professor Department of CSE. What is UNIX? •UNIX is an operating system is a set

What is UNIX?

• UNIX is an operating system is a set of Programs that acts as a interface between the computer and the user.

• The development of UNIX started around 1969 at AT&T Bell Labs by

Ken Thompson and Dennis Ritchie.

• UNIX is written in C Programming Language.

• UNIX was originally meant to be convenient platform forprogrammers developing software to be run on it and other system.

Page 3: Introduction to UNIX - notesinterpreter.in · Introduction to UNIX Harish Kumar .H .C Assistant Professor Department of CSE. What is UNIX? •UNIX is an operating system is a set

Features of UNIX

• Portable

Unix is developed by using C language.

• Multiuser

The UNIX design allows multiple users to concurrently share hardware and software.

• Multitasking

Allows the users to run more than one job at a time

Page 4: Introduction to UNIX - notesinterpreter.in · Introduction to UNIX Harish Kumar .H .C Assistant Professor Department of CSE. What is UNIX? •UNIX is an operating system is a set

Features of UNIX(continue…)

• Networking

Networking allows user at one location to log into system at other

sites.

• Organized file system

Unix has a very well organized file and directory system that allows

users to organize and maintain files.

• Device Independence

Unix treats every thing(input/output device) like a file.

Page 5: Introduction to UNIX - notesinterpreter.in · Introduction to UNIX Harish Kumar .H .C Assistant Professor Department of CSE. What is UNIX? •UNIX is an operating system is a set

Features of UNIX(continue…)

• Utilities

Productivity is directly proportional to the software facilities available

on a system.

• Services

In a large user environment. Specially designated administrators(system administrator) monitor the system and help user when necessary.

Unix includes the support utilities for system administration and control.

Page 6: Introduction to UNIX - notesinterpreter.in · Introduction to UNIX Harish Kumar .H .C Assistant Professor Department of CSE. What is UNIX? •UNIX is an operating system is a set

Computer system

• Computer system = Hardware + Software

• Hardware is the physical equipments.

• Software is a set of programs(instructions)that allows the hardware to do its job.

Computer System

ComputerSystem

Hardware Software

Page 7: Introduction to UNIX - notesinterpreter.in · Introduction to UNIX Harish Kumar .H .C Assistant Professor Department of CSE. What is UNIX? •UNIX is an operating system is a set

Hardware

• The Hardware in a computer system is the combination of devices that can be seen and touched.

• Computer is made up of four basic types of devices1. input devices

2. output devices

3. Central Processing Unit(CPU)

4. Auxiliary(secondary) devices

Page 8: Introduction to UNIX - notesinterpreter.in · Introduction to UNIX Harish Kumar .H .C Assistant Professor Department of CSE. What is UNIX? •UNIX is an operating system is a set

Hardware(continue …)

Page 9: Introduction to UNIX - notesinterpreter.in · Introduction to UNIX Harish Kumar .H .C Assistant Professor Department of CSE. What is UNIX? •UNIX is an operating system is a set

Software

• The software of a computer system is the combination of programs written to make the computer a multipurpose machine.

Software

System software

Application software

Page 10: Introduction to UNIX - notesinterpreter.in · Introduction to UNIX Harish Kumar .H .C Assistant Professor Department of CSE. What is UNIX? •UNIX is an operating system is a set

Software(continue…)

• System Software consists of the set of programs that serves the of computer itself

Ex: Operating system and set of support programs

• Application Software consists of set of programs that are written to solve user’s Problem

Page 11: Introduction to UNIX - notesinterpreter.in · Introduction to UNIX Harish Kumar .H .C Assistant Professor Department of CSE. What is UNIX? •UNIX is an operating system is a set

The operating system

• The OS is a special category of system software that manages all the operating facets of the computer.

• OS gives the computer its heart and character.

• Primary tasks performed by the OS are1. Resource allocation and scheduling.

2. Data management include file input and output.

3. System security.

Page 12: Introduction to UNIX - notesinterpreter.in · Introduction to UNIX Harish Kumar .H .C Assistant Professor Department of CSE. What is UNIX? •UNIX is an operating system is a set

The UNIX Environment

• UNIX is multiuser,multiprogramming,portable operating systemdesigned to facilitate programming, text processing, communicationand many other tasks.

• OS contains hundreds of simple, single-purpose functions that can be combined to do virtually every processing task imaginable.

Page 13: Introduction to UNIX - notesinterpreter.in · Introduction to UNIX Harish Kumar .H .C Assistant Professor Department of CSE. What is UNIX? •UNIX is an operating system is a set

There are three different computing environments:• Personal Environment.

a) UNIX is a multiuser environment, many users are installing UNIX

on their personal computers.

b) Personal UNIX systems accelerated in the mid-1990’s with the

availability of Linux

• Time Sharing Environment.

• Client/Server Environment.

Page 14: Introduction to UNIX - notesinterpreter.in · Introduction to UNIX Harish Kumar .H .C Assistant Professor Department of CSE. What is UNIX? •UNIX is an operating system is a set

Time-Sharing Environment

• All of the computing must be done by the central computer.

• Central computer control the shared resources and manage the shared data.

• Slow response and less productive.

Page 15: Introduction to UNIX - notesinterpreter.in · Introduction to UNIX Harish Kumar .H .C Assistant Professor Department of CSE. What is UNIX? •UNIX is an operating system is a set

Client/Server Environment

• Splits the computing environment between a central computer anduser’s computers.

• The user’s microcomputers or workstations are called client.

• The central computer, which may be a powerful microcomputer, aminicomputer, or a central main frame system, is know as the server.

• Fast response and more productive.

Page 16: Introduction to UNIX - notesinterpreter.in · Introduction to UNIX Harish Kumar .H .C Assistant Professor Department of CSE. What is UNIX? •UNIX is an operating system is a set

UNIX structure

• UNIX consists of four major components:a. The kernel

b. The shell

c. A standard set of utilities.

d. Application programs.

Page 17: Introduction to UNIX - notesinterpreter.in · Introduction to UNIX Harish Kumar .H .C Assistant Professor Department of CSE. What is UNIX? •UNIX is an operating system is a set

The kernel

• The kernel is the heart of the UNIX system.

• The kernel contains the two most basic parts of the operating systemProcess control.

Resource management.

Page 18: Introduction to UNIX - notesinterpreter.in · Introduction to UNIX Harish Kumar .H .C Assistant Professor Department of CSE. What is UNIX? •UNIX is an operating system is a set

The Shell

• Visible to the user.

• Receives and interprets the commands entered by the user.

• To do anything in the system, we must give the shell acommand.

• If the command requires a utility, the shell requests that thekernel execute the utility. If the command requires anapplication program, the shell requests that it be run.

Page 19: Introduction to UNIX - notesinterpreter.in · Introduction to UNIX Harish Kumar .H .C Assistant Professor Department of CSE. What is UNIX? •UNIX is an operating system is a set

Some standard UNIX shells

StandardShells

Bourne C Korn

Bash tcsh

Page 20: Introduction to UNIX - notesinterpreter.in · Introduction to UNIX Harish Kumar .H .C Assistant Professor Department of CSE. What is UNIX? •UNIX is an operating system is a set

Shell script and Shell Program

• A shell script is a file that contains shell commands that perform a useful function. It is also known as shell Program.

• There are three standard shells used in UNIX today.

Bourne shell developed by Steve Bourne at AT&T labs.

C shell developed by Bill joy in Berkeley.

Korn shell developed by David Korn at AT&T labs.

Page 21: Introduction to UNIX - notesinterpreter.in · Introduction to UNIX Harish Kumar .H .C Assistant Professor Department of CSE. What is UNIX? •UNIX is an operating system is a set

Utilities

• A utility is a standard UNIX program that provide a support process for users.

• Common utilities are text editors, search programs and sort program.

• Utilities are sophisticated applications.

• Standard Utilities started there out as applications years ago and proved so useful that they are now part of the system.

Page 22: Introduction to UNIX - notesinterpreter.in · Introduction to UNIX Harish Kumar .H .C Assistant Professor Department of CSE. What is UNIX? •UNIX is an operating system is a set

Applications

• Applications are the programs that are not a standard part of UNIX.

• Applications are written by System administrators, ProfessionalProgrammers, or users.

• Applications provides an extended capability to the system.

Page 23: Introduction to UNIX - notesinterpreter.in · Introduction to UNIX Harish Kumar .H .C Assistant Professor Department of CSE. What is UNIX? •UNIX is an operating system is a set

Accessing UNIX

• log in: Enter in to UNIX system.

• Log out: come out of UNIX system.

• Session: The time spent working with the system.

• User id: you (user) and your (his/her) account are identified by a

special code.

Created by system administrator(sys admin).

• Password: is a secret code that you (user) supply to the server so that

no one can figure out what they are.

Page 24: Introduction to UNIX - notesinterpreter.in · Introduction to UNIX Harish Kumar .H .C Assistant Professor Department of CSE. What is UNIX? •UNIX is an operating system is a set

Interactive session= login +Interaction+logout

Page 25: Introduction to UNIX - notesinterpreter.in · Introduction to UNIX Harish Kumar .H .C Assistant Professor Department of CSE. What is UNIX? •UNIX is an operating system is a set

Commands

• The basis of all UNIX interaction is the command.

• A UNIX command is an action request given to the UNIX shell forexecution.

• The simplest commands are a single line entered at the line prompt

that cause a program or shell to be executed.

• They can also be included in executable files to form scripts.

• All UNIX commands apply an action or series of actions to some input data and create some output data.

Page 26: Introduction to UNIX - notesinterpreter.in · Introduction to UNIX Harish Kumar .H .C Assistant Professor Department of CSE. What is UNIX? •UNIX is an operating system is a set

Source and Destination of Data

Page 27: Introduction to UNIX - notesinterpreter.in · Introduction to UNIX Harish Kumar .H .C Assistant Professor Department of CSE. What is UNIX? •UNIX is an operating system is a set

Command Syntax

• $ verb [options][arguments]

• verb is the command name. The command indicates what action is to be taken.

• Options modifies how the action is applied.

• Options are usually one character preceded by + or – sign.

• argument provides additional information to the command.