Professional Documents
Culture Documents
Unix Os: DAY - 1 Session - 1
Unix Os: DAY - 1 Session - 1
Unix Os: DAY - 1 Session - 1
DAY 1 Session - 1
9/14/2012 6:34:06 AM
Classification: GE Internal
Session 1
Objectives
Identify the functions of an OS Differentiate between single-user & multi-user OS What is UNIX ?
History of UNIX
Features of Unix
Objectives (contd.)
Identify the various shell available in Unix Start a Unix session List the users who are currently logged in
Objectives (contd.)
Create a directory using mkdir command Delete a directory using rmdir command Copy a file using the cp command
9/14/2012 6:34:07 AM
Classification: GE Internal
Getting Started
OS
An OS is a software program that acts an interface between a user & a computer, e.g. Linux, Unix, MSDOS, etc.
Functions
of an OS
Command
Interpreter Process Management Memory Management I/O Operation & Peripheral Management File Management
9/14/2012 6:34:08 AM Classification: GE Internal Day 1/Session 1/Slide 5
of System
Systems
Single-User
A single-user system was designed for use by1 person at a time. A PC is a popular single-user system.
Single
User OS
9/14/2012 6:34:08 AM
Classification: GE Internal
of System (contd.)
Systems
Multi-User
9/14/2012 6:34:08 AM
Classification: GE Internal
of System(continued)
Systems
Multi-User
Linux, Unix & Windows NT/2K/2K3 are examples of a multi-user systems More than one user can connect to the system & work concurrently at any point of time.
9/14/2012 6:34:08 AM
Classification: GE Internal
What is UNIX ?
UNIX
(or Unix) is a portable, multi-task and multi-user computer operating system originally developed by a group of AT&T Bell Labs employees including Ken Thompson, Dennis Ritchie and Douglas McIlroy.
9/14/2012 6:34:08 AM
Classification: GE Internal
History of UNIX
MULTICS was developed at MIT, AT&T Bell Labs, GE, in the 60s as on OS but was scrapped because of overheads. Ken Thompson took person interest an developed UNICS and wrote it in assembly UNICS was renamed to UNIX. Unix was re-written in 1973 in C Language for portability. History Of Unix
9/14/2012 6:34:08 AM
Classification: GE Internal
Feature of Unix
user OS. Time Sharing Multi - tasking Device Independent All the resources are files. Hierarchical File System. Text processing is easy with Unix tools.
Multi
9/14/2012 6:34:08 AM Classification: GE Internal Day 1/Session 1/Slide 11
UNIX OS Flavors
Unix Product Company/Organization
AIX
A/UX BSD-lite & BSD Dynix
IBM www-1.ibm.com/servers/aix
Apple University of California, Berkeley Sequent
HP-UX
Irix
Hewlett-Packard
Silicon Graphics
SCO
Solaris Unixware Ultrix
9/14/2012 6:34:08 AM
Linux OS Flavors
Distributors Name Website
Red Hat Caldera Mandrake www.redhat.com www.caldera.com www.linux-mandrake.com
Debian
Suse Slackware
9/14/2012 6:34:08 AM
www.debian.org
www.suse.com www.slackware.com
Classification: GE Internal Day 1/Session 1/Slide 13
Single User
Single Tasking Not a Time Sharing OS
CLI
Shell - command.com Kernel msdos.sys FAT Max Partition Size 2 GB Cost is very less
9/14/2012 6:34:08 AM
9/14/2012 6:34:08 AM
Classification: GE Internal
Bourne Shell (path:/bin/sh) Bourne Again Shell (path:/bin/sh) C Shell (path:/bin/csh) Korn Shell (path:/bin/csh) Restricted Shell (path:/bin/rsh) Tcsh Shell (path:/bin/tcsh) A Shell (path:/bin/ash) Z Shell(path:/bin/rsh)
9/14/2012 6:34:08 AM Classification: GE Internal Day 1/Session 1/Slide 16
Shell
The program that reads and interprets the command execute by the user is known as the shell. The booting & SU shell is Bourne Shell developed by Stephen Bourne for Unix OS. The booting & SU shell for Unix like OS is Bourne Again Shell. The C shell is developed by Bill Joe and is C like. Korn Shell developed by David Korn is a combination of Bourn & C Shell. The user prompt for Bourne Shell is $. The user prompt for C Shell is %. The user prompt for Korn Shell is $. The prompt for SU is #.
Classification: GE Internal Day 1/Session 1/Slide 17
9/14/2012 6:34:08 AM
to a computer running the Unix OS from any other computer using telnet program.
telnet hostname or IP Address
The
administrator assigns each user a HOME directory when a new logon account is created.
9/14/2012 6:34:08 AM
Classification: GE Internal
list of users who are currently logged in can be found by using the who command who [options]
9/14/2012 6:34:08 AM
Classification: GE Internal
Passwords
Security for the Users: Passwords Unix provides an additional measure of security by allowing you to have a password associated with your login name The combination of the login name & password is checked by Unix to verify if it is an authorized user Changing the User Password Passwords can be changed using the passwd command The passwd command prompts for the old password to ensure that only authorizes user is trying to change it.
9/14/2012 6:34:08 AM Classification: GE Internal Day 1/Session 1/Slide 20
Root user
The root user (also know as the super user) is the administrator of the Unix OS.
9/14/2012 6:34:08 AM
Classification: GE Internal
Typing exit or logout or <Ctrl + D> at the command prompt ends current Unix session
9/14/2012 6:34:08 AM
Classification: GE Internal
9/14/2012 6:34:08 AM
Classification: GE Internal
9/14/2012 6:34:09 AM
Classification: GE Internal
The /bin directory stores many utilities of Unix The /dev directory stores all the device-related files for the system The /etc stores OS related data which the user & the OS needs to refer to, such as the passwd file. The /usr or /home (Linux) directory contains all the HOME directories of all the users in the system
9/14/2012 6:34:09 AM
Classification: GE Internal
/usr directory stores in Linux OS stores the OS files that are not part of the booting process The /var directory has the information specific to different utilities The /mnt directory stores the mountable devices
9/14/2012 6:34:09 AM
Classification: GE Internal
be up to 256 character long Can contain special characters, except / Can contain both uppercase & lower case letters. Files are case sensitive Should not contain blank or tab
9/14/2012 6:34:09 AM
Classification: GE Internal
Ordinary Files
Special Files
Direcory Files
Hard Link
Symbolic Link
Day 1/Session 1/Slide 28
Classification: GE Internal
A System Administrator (SA/su) is primarily responsible for the smooth operation of the Unix OS.
The user who creates the file is said to be the owner. A group of users is also given a name, just as the user These are those users who do not belong to a particular group
File Owner
Group Owner
Other Users
9/14/2012 6:34:09 AM
Classification: GE Internal
The pwd (print working directory) command is used to display full path name of the current directory
The ls command is used to display the names of the files and sub-directories in a directory The cd (change directory) command changes to the directory specified
9/14/2012 6:34:09 AM
Classification: GE Internal
a Directory
mkdir (make directory) command is used to create directories. rmdir (remove directory) command removes the specified directory
Removing a Directory
The
9/14/2012 6:34:09 AM
Classification: GE Internal
The cat (concatenate) command displays the contains of the specified file Copying the files
The cp (copy)command duplicates the contents of the source file in the target file
cp options source file target file
9/14/2012 6:34:09 AM
Classification: GE Internal
The mv (move) command is used to move a file or a directory from one location to another or to change its name mv option source destination
The more command is used to display the data one screen-full at a time. While viewing a file using more command, once the user scrolls down, he cant move up.
more options filename
9/14/2012 6:34:09 AM
Classification: GE Internal
less command is similar to more command except that the user can scroll upwards also while viewing the file.
less options filename
9/14/2012 6:34:09 AM
Classification: GE Internal
Wild Characters
The shell offers the facility to perform an operation on a set of files by the use of certain special characters in the command in place of the actual filenames The * wild card is interpreted as a string of none, one or more characters The ? wild card matches exactly one or more occurrence of any character The [ ] wild card can be used to restrict the characters to be matched
9/14/2012 6:34:09 AM Classification: GE Internal Day 1/Session 1/Slide 35
man command is used to get online help to a user about the various options for any command in Unix.
man command
9/14/2012 6:34:10 AM
Classification: GE Internal
Miscellaneous Commands
Command bc cal clear date echo Description Basic Calculator Calendar To clear the screen To display system date & time To display a string
tty
type uname
Terminal type
To display whether the command is built-in or not Name of the System
unit
wc who who am i
To find units
The count of lines, words & characters in the file To display the number of user logged in to the OS If the user wants to know who is he logged in as
9/14/2012 6:34:10 AM
Classification: GE Internal
Summary
In this Session : An a OS has the following functions:
Command Interpreter Process Management Memory Management I/O Operation& Peripheral Management File Management
A single-user is designed to be used by one person at a time More than one user can work simultaneously on a multi-user system
9/14/2012 6:34:10 AM Classification: GE Internal Day 1/Session 1/Slide 38
Summary(contd.)
What
is UNIX? History of UNIX? Feature of UNIX Unix Flavors Linux Flavors DOS & UNIX
9/14/2012 6:34:10 AM
Classification: GE Internal
Summary(contd.)
The Unix OS consist of the kernel, shell, utilities and application programs Some of the commonly available shells are:
Bourne Shell C Shell Korn Shell Restricted Shell Bash Shell Tcsh Shell A Shell Z Shell
Classification: GE Internal Day 1/Session 1/Slide 40
9/14/2012 6:34:10 AM
Summary(contd.)
The telnet command is used to connect to a Unix server The passwd command is used to change the password of the user. For organizing the data on the disk, Unix provides a file system which allows the user to group files in a convenient manner. The Unix file system has a hierarchal structure & files can be stored under directories
9/14/2012 6:34:10 AM Classification: GE Internal Day 1/Session 1/Slide 41
Summary(contd.)
Ordinary files Directory files Special files System Administrator (SA/su) File Owner Group Owner Other user
9/14/2012 6:34:10 AM
Classification: GE Internal
Summary(contd.)
Some
9/14/2012 6:34:10 AM
Classification: GE Internal
Summary(contd.)
Some
9/14/2012 6:34:10 AM
Classification: GE Internal
Summary(contd.)
The shell offers a facility to perform an operation on a set of files by using the wild card pattern. The most common wild cards:
? Matches one character in a file name * Matches zero, one or more than one character in a file name [ ] Matches one character from the enclosed list
The man command is used to get online help to a user about various options for any command. Miscellaneous Commands
9/14/2012 6:34:10 AM Classification: GE Internal Day 1/Session 1/Slide 45
Recall
RECALL
9/14/2012 6:34:10 AM
Classification: GE Internal
Assignments
Assignment
9/14/2012 6:34:10 AM
Classification: GE Internal
END of SESSION -1
9/14/2012 6:34:07 AM
Classification: GE Internal
Session 1