Download introduction to unix system

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Smallfoot wikipedia , lookup

Mobile operating system wikipedia , lookup

MTS system architecture wikipedia , lookup

Distributed operating system wikipedia , lookup

Acorn MOS wikipedia , lookup

Library (computing) wikipedia , lookup

Copland (operating system) wikipedia , lookup

Process management (computing) wikipedia , lookup

IBM AIX wikipedia , lookup

Burroughs MCP wikipedia , lookup

Security-focused operating system wikipedia , lookup

RSTS/E wikipedia , lookup

CP/M wikipedia , lookup

VS/9 wikipedia , lookup

Plan 9 from Bell Labs wikipedia , lookup

DNIX wikipedia , lookup

Berkeley Software Distribution wikipedia , lookup

History of Unix wikipedia , lookup

Spring (operating system) wikipedia , lookup

Unix time wikipedia , lookup

Unix wikipedia , lookup

Unix security wikipedia , lookup

Transcript
TMK 265: UNIX SYSTEM
CHAPTER ONE – UNIX
PHILOSOPHY
© Prepared By:
Razif Razali
1
OVERVIEW
– The UNIX Philosophy
– Introduction to Unix System
– History of Unix
– Unix structure
© Prepared By:
Razif Razali
2
The UNIX Philosophy
•
In 1994 Mike Gancarz (a member of the team that designed the X
Window System), drew on his own experience with Unix, as well as
discussions with fellow programmers and people in other fields who
depended on Unix, to produce The UNIX Philosophy which sums it up
into 9 paramount precepts:
–
–
–
–
–
–
–
–
–
Small is beautiful.
Make each program do one thing well.
Build a prototype as soon as possible.
Choose portability over efficiency.
Store data in flat text files.
Use software leverage to your advantage.
Use shell scripts to increase leverage and portability.
Avoid captive user interfaces.
Make every program a filter
© Prepared By:
Razif Razali
3
INTRODUCTION TO UNIX SYSTEM
• What is UNIX?
– UNIX is an operating system which was first developed in the
1960s, and has been under constant development ever since. By
operating system, we mean the suite of programs which make the
computer work. It is a stable, multi-user, multi-tasking system for
servers, desktops and laptops.
– UNIX systems also have a graphical user interface (GUI) similar to
Microsoft Windows which provides an easy to use environment.
– However, knowledge of UNIX is required for operations which
aren't covered by a graphical program, or for when there is no
windows interface available, for example, in a telnet session.
© Prepared By:
Razif Razali
4
INTRODUCTION TO UNIX SYSTEM
• Types of UNIX
– There are many different versions of UNIX, although they share
common similarities.
– The most popular varieties of UNIX are Sun Solaris, GNU/Linux,
and MacOS X.
– Here in the School, we use Solaris on our servers and
workstations, and Fedora Core Linux on the servers and desktop
PCs.
© Prepared By:
Razif Razali
5
INTRODUCTION TO UNIX SYSTEM
• The UNIX operating system is made up of three parts; the kernel,
the shell and the programs.
• The kernel
– The kernel of UNIX is the hub of the operating system: it allocates
time and memory to programs and handles the filestore and
communications in response to system calls.
– As an illustration of the way that the shell and the kernel work
together, suppose a user types rm myfile (which has the effect of
removing the file myfile).
– The shell searches the filestore for the file containing the program
rm, and then requests the kernel, through system calls, to execute
the program rm on myfile. When the process rm myfile has finished
running, the shell then returns the UNIX prompt % to the user,
indicating that it is waiting for further commands.
© Prepared By:
Razif Razali
6
INTRODUCTION TO UNIX SYSTEM
• The shell
– The shell acts as an interface between the user and the
kernel.
– When a user logs in, the login program checks the
username and password, and then starts another
program called the shell.
– The shell is a command line interpreter (CLI). It
interprets the commands the user types in and
arranges for them to be carried out.
– The commands are themselves programs: when they
terminate, the shell gives the user another prompt (%
on our systems).
© Prepared By:
Razif Razali
7
INTRODUCTION TO UNIX SYSTEM
– Types of Shell in UNIX environment:
•
•
•
•
•
Bourne Shell (sh)
Bourne Again Shell (bash)
Korn Shell (ksh)
C Shell (csh)
Es Shell (es)
© Prepared By:
Razif Razali
8
INTRODUCTION TO UNIX SYSTEM
• The adept user can customize his/her own shell, and users can
use different shells on the same machine. Staff and students in
the school have the tcsh shell by default.
• The tcsh shell has certain features to help the user inputting
commands.
• Filename Completion - By typing part of the name of a command,
filename or directory and pressing the [Tab] key, the tcsh shell
will complete the rest of the name automatically.
• History - The shell keeps a list of the commands you have typed
in. If you need to repeat a command, use the cursor keys to
scroll up and down the list or type history for a list of previous
commands.
© Prepared By:
Razif Razali
9
HISTORY OF UNIX
• The origin of Unix
© Prepared By:
Razif Razali
10
UNIX STRUCTURE
• Unix structure will be divided into
– File system
– Operating System
© Prepared By:
Razif Razali
11
FILE SYSTEM
• The file system is the part of UNIX that organizes and keeps track
of data.
• The UNIX file system (UFS) is a file system used by many UNIX
and Unix-like operating systems.
• It is also called the Berkeley Fast File System, the BSD Fast File
System or FFS.
• It is a distant descendant of the original file system used by
Version 7 Unix.
• File System in UNIX
© Prepared By:
Razif Razali
12
OPERATING SYSTEM
• UNIX is a layered operating system. The innermost layer is the
hardware that provides the services for the OS.
• The operating system, referred to in UNIX as the kernel, interacts
directly with the hardware and provides the services to the user
programs.
• These user programs don't need to know anything about the
hardware. They just need to know how to interact with the kernel
and it's up to the kernel to provide the desired service.
• Operating System
© Prepared By:
Razif Razali
13
Why Use Unix?
• One of the biggest reasons for using Unix is networking capability.
With other operating systems, additional software must be
purchased for networking. With Unix, networking capability is
simply part of the operating system. Unix is ideal for such things
as world wide e-mail and connecting to the Internet.
• Unix was founded on what could be called a "small is good"
philosophy. The idea is that each program is designed to do one
job well. Because Unix was developed by different people with
different needs it has grown to an operating system that is both
flexible and easy to adapt for specific needs.
• Unix was written in a machine independent language. So Unix and
unix-like operating systems can run on a variety of hardware.
© Prepared By:
Razif Razali
14
Advantages of UNIX
• It is multitasking, therefore, multiple programs can run at one time.
• It is multiuser, allowing more than a single user to work at any
given time. This is accomplished by sharing processing time
between each user and utilizing distributed computing systems.
• It is safe, preventing one program from accessing memory or
storage space allocated to another, and enables protection,
requiring users to have permission to perform certain functions,
i.e. accessing a directory, file, or disk drive.
© Prepared By:
Razif Razali
15
Disadvantages of UNIX
• The traditional command line shell interface is user hostile -designed for the programmer, not the casual user.
• Commands often have cryptic names and give very little response
to tell the user what they are doing.
• To use Unix well, you need to understand some of the main design
features.
• Richness of utilities (over 400 standard ones) often overwhelms
novices.
• Documentation is short on examples and tutorials to help you
figure out how to use the many tools provided to accomplish
various kinds of tasks.
© Prepared By:
Razif Razali
16
CONCLUSION
•
•
•
•
•
The UNIX philosophy
UNIX history
UNIX Structure
Advantages of using UNIX
Disadvantages of using UNIX
© Prepared By:
Razif Razali
17