CIS 721 - Lecture 1

Download Report

Transcript CIS 721 - Lecture 1

CS 497C – Introduction to UNIX
Lecture 1: Getting Started
Chin-Chih Chang
[email protected]
Objective and Preface
• This course is to learn the fundamentals
of UNIX. This course introduces the
concept of UNIX operating system and
the essential commands of UNIX .
• UNIX was never designed for the world.
There is a method to this madness.
• Many Internet applications are powered
by UNIX.
The Operating System
• An operating system (sometimes
abbreviated as “OS”) is a program that
functions as a virtual machine (layer of
software on top of bare hardware) and a
resource manager (software that controls
access to computer).
• It interacts with two agencies: applications
and a command language interpreter.
• DOS, Windows, Mac OS, and UNIX are
examples of the operating system.
The UNIX Operating System
• UNIX (sometimes spelled “Unix”) is an
operating system that originated at Bell
Labs in 1969. Ken Thompson and Dennis
Ritchie are considered the inventors of
UNIX.
• UNIX has evolved as a kind of large
freeware product, with many extensions and
new ideas provided in a variety of versions
of UNIX by different companies,
universities, and individuals.
Knowing Your Machine
• Unlike Windows, UNIX can be used by
several users concurrently.
• You can access to such a multiuser system
through a terminal or a workstation.
• A terminal consists of a monitor and a
keyboard.
• A workstation has its own CPU, memory,
and hard disk.
Knowing Your Keyboard
• Every key on your computer has a function
in UNIX.
• Each character has its ASCII value.
• [Enter] / [Return] is used to terminate a
line.
• [Backspace] corrects typing mistakes.
• [Ctrl] is used in combination with other
keys to produce control characters.
• [Alt] combinations are used in emacs.
The System Administrator
• A system administrator is in charge of
administration of the system.
• The system administrator is responsible for:
–
–
–
–
–
–
the entire setup,
user accounts allocation,
file systems maintenance,
backups,
disk space management,
other assignments.
• The administrator has a special user
account; it is called root.
Logging In and Out
• Logging In
login: remeo [Enter]
password:
Last login: Mon Aug 20 22:11:17 on tty2
$
• The shell produces the prompt and accepts all
your input from the keyboard.
• Logging Out
$ [Ctrl-d]
$logout[Enter]
$exit[Enter]
login:
Trying Out Some Commands
•
•
•
•
•
•
•
passwd: changing your own password
who: who are the users?
who am i
tty: know your terminal name
echo $SHELL: know your shell
echo $TERM: know your terminal type
set: know your envirnoment
Two Important Observations
• UNIX commands are in lowercase
• The [Enter] key
When Things Go Wrong
• Backspacing doesn’t work – [Ctrl-h], [Del]
• A command has to be interrupted – [Ctrl-d],
[Ctrl-c] [Delete]
• Killing a line – [Ctrl-u]
• Other Problems
– Suspend a job – [Ctrl-z], resume a job – fg
– Stop scrolling – [Ctrl-s], resume scrolling [Ctrl-q]
– Restore a terminal – stty sane
– [Enter] – [Ctrl-j] or [Ctrl-m]
– Close the program - q, quit, exit, or [Ctrl-d]
What’s Next
•
•
•
•
•
More commands
How It All Clicked
Linux and GNU
Inside UNIX
Read Chapter 1.