Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

Chapter 1

Introduction to UNIX
What is an Operating System?

An Operating System is a special computer program (software) that


controls the computer (hardware). The Operating system serves as a liaison
between the consumers and the resources, often coordinating the
allocation of limited resources among numerous consumers.

Disks
Users
Memory
CPU
Operating System
Programs Network
Printers

Consumers Resources
UNIX Operating System
An operating System can be thought of as
1. Resource Allocator – the operating system manages the
different computer resources such as CPU time,
memory space, file storage space, I/O devices, etc. and
allocates them to different application programs and
users.
2. Control Program – it controls the execution of programs
and the various I/O devices.
Unix Services
An operating system provides the following services for users:
1. Program Execution – loads the user program in memory and
runs it.
2. I/O Operations – responsible for reading and/or writing data
from I/O devices such as disks, tapes, printers, keyboards, etc.
3. File System Handling – handles the way files are organized
within the disk or tape. It takes care of the creation and
deletion of files for users.
4. Error Detection – detect errors within the computer system
(CPU, memory, I/O, or user program) and take the appropriate
action.
History of UNIX

1969 UNIX developed by AT&T Bell Labs


1980 UC Berkeley BSD UNIX 4.2 becomes widely used
Early 1980s Hewlett-Packard introduces HP-UX
Early 1990s POSIX, Portable Operating System Interface
UNIX Variants
•AIX – from IBM
•HP-UX – from Hewlett-Packard
•Ultrix – from DEC
•Xenix – from Microsoft
•OSF/1 – from Open Software Foundation
•Solaris – from Sun Microsystems
•Linux – Linus Torvalds
•Ubuntu
•Suse (Novell Netware)
•Red Hat
•Debian
UNIX Varieties and Benefits

Benefits of UNIX
•based on an open standard
•supported on a wide variety of computers
•TCP/IP tightly integrated
•true 64bit architecture
•Hierarchical File System
•Multi-tasking; Multi-user
UNIX Architecture

The main concept that unites all the versions


of Unix is the following four basics
• Kernel
• Shell
• Commands and Utilities
• Files and Directories
Operating System Components
File System Directory Hierarchy File System - group of directories that
can be thought of as a separate tree
structure
similar to logical partitions in the
Windows/DOS world (like C: or D:
drive)
made available (mounted) or
unavailable (unmounted) at the
administrator’s discretion
can either be local (on your computer)
or remote (on another computer)
Directory - location for other files and
subdirectories
like a file drawer in a file cabinet
Subdirectory - Any directory below
another directory
Files - contained in directories and
subdirectories
Common Subdirectories
/usr directory - executables,
system admin utilities, and library
routines
/opt (optional) directory -
applications and third party
applications
/dev (devices) directory - files
which are pointers to device names
/etc (etcetera) directory - system
admin files (passwd file)
/export/home directory - user
home directories
/kernel directory - basic operating
system files (main UNIX kernel
genunix)
/var (variable) directory - print
spooling and mail system error
messages
Shells

Bourne shell ($)


•developed by Stephen Bourne for AT&T
•original shell program
•Provides a UNIX system command interpreter
•Supports a programmable interface to develop shell programs
Korn shell ($)
•developed by David Korn at Bell Labs
•An enhanced Bourne shell
•added features such as aliasing and history
•most widely used shell and is industry standard for users
•this course is based primarily on the Korn shell
Shell cont..

C shell (%)
•developed at the University of California Berkley by Bill Joy
•Short California Shell
•based on the C programming language
•Allows recalling and editing of previously entered commands and
aliasing
POSIX shell
•Similar to Korn shell
•Command programming language and command interpreter
•It supporst command history, line editing, file name completion,
aliasing, and job control
In Unix, there are three basic types of files:
• Ordinary Files − An ordinary file is a file on the system that contains data, text, or
program instructions.
• Directories − Directories store both special and ordinary files. For users familiar with
Windows or Mac OS, Unix directories are equivalent to folders.
• Special Files − Some special files provide access to hardware such as hard drives, CD-
ROM drives, modems, and Ethernet adapters. Other special files are similar to aliases or
shortcuts and enable you to access a single file using different names.

You might also like