Download CIS 721 - Lecture 1

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

Acorn MOS wikipedia , lookup

MTS system architecture wikipedia , lookup

Process management (computing) wikipedia , lookup

Linux adoption wikipedia , lookup

CP/M wikipedia , lookup

Linux wikipedia , lookup

Burroughs MCP wikipedia , lookup

VS/9 wikipedia , lookup

RSTS/E wikipedia , lookup

Linux kernel wikipedia , lookup

Batch file wikipedia , lookup

Smallfoot wikipedia , lookup

Caldera OpenLinux wikipedia , lookup

Security-focused operating system wikipedia , lookup

Plan 9 from Bell Labs wikipedia , lookup

Berkeley Software Distribution wikipedia , lookup

Spring (operating system) wikipedia , lookup

History of Unix wikipedia , lookup

Unix time wikipedia , lookup

DNIX wikipedia , lookup

Unix wikipedia , lookup

Unix security wikipedia , lookup

Transcript
CS 497C – Introduction to UNIX
Lecture 3: Inside UNIX
Chin-Chih Chang
[email protected]
Linux and GNU
• Although UNIX finally turned commercial,
Richard Stallman and Linus Torvalds had
different ideas.
• Torvalds is the father of Linux, the free
UNIX that has swept the computer world.
• Stallman runs the Free Software Foundation
(formerly known as GNU – a recursive
acronym that stands for “GNU’s NOT
Unix”)
Linux and GNU
• Linux is distributed under the GNU General
Public License which makes it mandatory
for developers and sellers to make the
source code public.
• Linux flavors: Red Hat, SuSE, Caldera,
TurboLinux, Mandrake, Debian.
• These distribution include a plethora of
software.
• www.linux.org
Inside UNIX
• The kernel and the shell are the masters of
UNIX.
• The shell interacts with the user and the
kernel with the machine’s hardware.
• The kernel is the center of the operating
system – a collection of programs mostly
written in C.
• The kernel is loaded into memory when the
system is booted.
The Kernel
• The kernel manages the system resources,
allocates time between users and processes,
decides process priorities and performs
other tasks.
• Other programs access the services of the
kernel through a set of functions called
system calls.
The Shell
• The shell takes a command from the user,
deciphers the special characters, and finally
communicates with the kernel.
• The shell is an interface between the user
and the kernel.
Inside UNIX
• UNIX is a multiuser system.
• In UNIX, a single user can also run multiple tasks
concurrently.
• UNIX tools singly aren’t all that powerful. Using
a supported interprocess communication feature,
the shell can arrange for a command to pass on
data to another command.
• UNIX doesn’t really care to know the type of file.
Inside UNIX
• UNIX supports a pattern matching feature.
• Apart from files, a special group of commands use
a generalized pattern (called a regular
expression).
• The UNIX shell is also a programming language.
• The language features of the UNIX shell are used
to design shell scripts.
• A shell script is a program including UNIX
commands.
Inside UNIX
• UNIX is written in C.
• Commands use system calls to invoke the
kernel.
• man – on-line help.
man Problem in CS Computers
• man may not work on all accounts because
of an incorrect MANPATH environment
variable. If man does not work for you,
please edit your .cshrc.linux and .login.linux
files and remove any line having to do with
MANPATH.
• pico - simple text editor in the style of Pine
Composer
• pine – a program for Internet News and
Email.
General Features of a Command
• A UNIX command consists of a single word
generally using alphabetic characters.
• Commands are essentially files representing
programs – mainly written in C. These files
are stored in certain folders known as
directories.
• For instance, the ls command is also a
program located in the directory /bin.
General Features of a Command
• A UNIX command file doesn’t need to have
a special extension like .exe and .com.
• There’s hardly a practical restriction on
length either; a command can be up to 255
characters long – a limit set for any file of
the file system.
• UNIX is sensitive to case.
$ LS
LS: Command not found.
Coming Next
•
•
•
•
Understanding the UNIX Command
Review Chapter 1.
Do Self-Test of Chapter 1.
Homework 1