Sie sind auf Seite 1von 25

Introduction to UNIX

Snapshots

Rel. April. 2000

Introduction to Operating System

Introduction to UNIX

Applications of UNIX

History of UNIX

Features of UNIX

Typical UNIX Based System

Login and Logout Procedure

Introductory Commands

date cal

banner write

mesg

who
1.1

passwd

Introduction to UNIX

Objectives

After studying this chapter, the students should be able to:

Understand concept of an Operating System

Understand Applications and Features of UNIX

Learn about the history of UNIX

Understand Login & Logout Procedures

Learn commands to display date, time, banner, calendar,


users information, changing password and sending
messages

Rel. April. 2000

1.2

Introduction to UNIX

Introduction to Operating System

Operating System

Rel. April. 2000

A layer of Software which:

Manages and controls the resources of the


Computer System

Forms an interface between the hardware and


the user

Provides the
development

foundation

1.3

for

applications

Introduction to UNIX

Hardware

Operating System
User

Rel. April. 2000

1.4

Introduction to UNIX

Operating System Services

Interprets and Executes User Commands

Manages the System Hardware

Allocates System Resources

Schedules Processes

Facilitates Recovery

Maintains File System

Performs Administrative Functions

Performs Housekeeping Tasks

Rel. April. 2000

1.5

Introduction to UNIX

Introduction to UNIX

Developed in 1969 by Ken Thompson

Popular Operating System, available from micro to


mainframe

Available for scientific as well as commercial use

Designed for effectiveness of:

Rel. April. 2000

Application Software Development

System Software Development

Application Execution

Academic and Research work


1.6

Introduction to UNIX

Applications of UNIX

Business environment

Rel. April. 2000

Word processing

Financial accounting

Database management

Communication

Graphics

Software developments

Office automation
1.7

Introduction to UNIX

Academic and scientific environment


Operating System research
Prime Operating System for conducting research work

History of UNIX

Originator

Motivation
: To transfer programs form
GE645 to PDP-7 machine

Name derived from

Original version
: Single user, for PDP-7 written
in Assembly language (1969)

Transition
language (1971)

Rewritten
System in C (1973)

: As a multi-user Operating

Rel. April. 2000

: Ken Thompson

: MULTICS

1.8

Moved

to

PDP-11

in

Introduction to UNIX

Licensed to Universities : 1974

Microcomputer version

: 1980

Commercial version

: UNIX system III in 1981

Versions of AT & T UNIX


Comments
Year
Version
Released
Use for universities only
1975
Version 6
Sold commercially, but used mostly in
1978
Version 7
universities
Change in numbering indicated
1981
System-II
change to commercial orientation.
Many enhancements of System-III to
1983
System-V
improve commercial
Release 1
applications
Rel. April. 2000

1.9

Introduction to UNIX

System-V
1984 It has additional features to improve
Release 2.0
system performance.
System-V
1986 It has enhancements over shared library.
Release 3.0
System-V
1989 It added support to hardware for
Release 4.0
networking and other facilities

Rel. April. 2000

1.10

Introduction to UNIX

Features of UNIX

Multi-user / Multi-tasking / Time sharing System

Modularity

File structure

Input Output redirection and Pipes

Consistent peripheral interface

Security

Communication and Networking

Portability

Utilities

Software Development Tools

Rel. April. 2000

1.11

Introduction to UNIX

Rel. April. 2000

Typical UNIX Based Systems

System unit

Console

User terminals

Communication lines

Printer(s)

Modem

1.12

Introduction to UNIX

Communication
Lines
Modem

Printer(s)

System Unit
Remote User Terminals

- Processor
- Disk(s)
- Tape(s)
- Floppy Disk(s)

Local User Terminals

System
Console

Typical UNIX based system


Rel. April. 2000

1.13

Introduction to UNIX

Login and Logout Procedure

User can log in from any terminal of an initialized system

The login: prompt appears for the user to enter his / her
user-name

User-name and the password must be entered correctly

Every response must be terminated by pressing the Return


key

After successful login, the Operating Systems prompt will


appear on the screen

The work session continues until the user logs out

To Logout from a UNIX system, press CTRL+D (Control


and D) keys.

Rel. April. 2000

login: priya
password:

1.14

Introduction to UNIX

Introductory Commands

Rel. April. 2000

date
banner
who
passwd

cal
write
mesg

1.15

Introduction to UNIX

date

Display the system date and time

Syntax - $ date [+format]

Format directives of date

Rel. April. 2000

($ is the system prompt)

%D : displays date as mm/dd/yy

%a : displays abbreviated weekdays (Sun to Sat)

%h : displays abbreviated month (Jan to Dec)

%m : displays the month of year (01 to 12)

%d : displays the day of the month (01 to 31)

%y

: displays last two digits of the year (00 to 99)


1.16

Introduction to UNIX

Rel. April. 2000

Format directives of Time

%T : displays the time as HH:MM:SS

%H : displays the hour as (00 to 23)

%M : displays the minute (00 to 59)

%S : displays the seconds (00 to 59)

1.17

Introduction to UNIX

Examples:
$ date
<Enter>
Mon Mar 27 12:44:04 IST 1995 (this is the default
format)
date only shows the Day, Month of the year, Date, Time, Time
standard and the Year
$ date +%D
06/29/95
mm/dd/yy format

<Enter>
The output

$ date +%T
11:56:34
time

<Enter>
Will display the current

$ date +'%d %D %T'


<Enter>
29 06/29/95 12:01:11
Rel. April. 2000

1.18

will

be

in

Introduction to UNIX

cal
$ cal [[mm][yyyy]]
where
mm stands for month number from 1 to 12
yyyy stands for year from 1 to 9999

The various formats possible with the cal command are as


follows:
$ cal
will display calendar for the current or three
months
$ cal <year>
will display calendar for specified year
$ cal <month> <year>
will display calendar for specified
month and year.
Rel. April. 2000

1.19

Introduction to UNIX

Example:
$ cal

1 1985

<Enter>

The above command will display the calendar for January 1985

January
S
M
6
13
20
27

Rel. April. 2000

7
14
21
28

1985
Tu
1
8
15
22
29

2
9
16
23
30

Th
3
10
17
24
31

1.20

F
4
11
18
25

Sa
5
12
19
26

Introduction to UNIX

banner
$ banner

welcome to STG

<Enter>

$ banner

"welcome to STG"

<Enter>

write

The command line format is:


$ write <login name of the addressee>
<Enter>
Example:
To write to a user called raj, the following command can be
given:
$ write raj
Hi! I am going to have lunch
Are you coming along??
<ctrl d>
Rel. April. 2000$
1.21

<Enter>
<Enter>
<Enter>

Introduction to UNIX

mesg
$ mesg n will disable the terminal for write.
$ mesg y will make the terminal write enable.

Invoking mesg without an argument will display the status of


the terminal's write protection:

Rel. April. 2000

indicates write enabled.

indicates write protected or disabled.

1.22

Introduction to UNIX

who

Display the information about the co-users

$ who <Enter>
rs
supriya
ajay

tty02
tty03
tty01

May 24
May 24
May 24

12:29
12:15
1:10

am i

display the information of the user who


issued this command.

-T

displays the write permission status for all


logged-in users.

-H

displays column headings above the regular


output.

Rel. April. 2000

1.23

Introduction to UNIX

Example:
$ who

<Enter>

rs
supriya
ajay

tty02
tty03
tty01

May 24
May 24
May 24

12:29
12:15
1:10

passwd
$ passwd
Choose Password
1. Pick a Password
2.
Pronounceable password
generated for you
Enter choice (Default is 1)

Rel. April. 2000

1.24

will

be

Introduction to UNIX

Example: changing password by a user.


$ passwd <Enter>
setting password for user: priya
old password:
Choose password
1. Pick a Password
2. Pronounceable password will be generated
for you
Enter choice (Default is 1)
Please Enter new password (at least five
characters)
New-Password
Re-enter new password
Rel. April. 2000

1.25

Das könnte Ihnen auch gefallen