Introduction to Unix. Computer Hardware zCentral Processing Unit (CPU) yThe heart and brains of a...

25
Introduction to Unix

Transcript of Introduction to Unix. Computer Hardware zCentral Processing Unit (CPU) yThe heart and brains of a...

Page 1: Introduction to Unix. Computer Hardware zCentral Processing Unit (CPU) yThe heart and brains of a computer. yThe device that performs all calculations.

Introduction to Unix

Page 2: Introduction to Unix. Computer Hardware zCentral Processing Unit (CPU) yThe heart and brains of a computer. yThe device that performs all calculations.

Computer Hardware

Central Processing Unit (CPU) The heart and brains of a computer. The device that performs all calculations and data manipulation in

a computer.

Main Memory (RAM) The place the CPU looks for instructions and data to process.

Mass Storage (hard drive) Holds information not immediately needed by CPU. Holds massive amounts of data.

Input/Output Devices (keyboard, mouse, monitor, printer) Devices used to move information into and out of the computer.

Page 3: Introduction to Unix. Computer Hardware zCentral Processing Unit (CPU) yThe heart and brains of a computer. yThe device that performs all calculations.

Terminology - storage

bit Stands for Binary Digit. Smallest unit of storage in a

computer. A single 1 or 0.

byte 8 bits Used to store single

characters. (Sort of) ASCII characters.

kilo- Thousand kilobyte ~ 1,000 bytes. Actually = 210 bytes (1,024).

mega- Million Megabyte ~ 1,000,000 bytes. Actually = 220 bytes

(1,048,576). About 350 pages of text.

Page 4: Introduction to Unix. Computer Hardware zCentral Processing Unit (CPU) yThe heart and brains of a computer. yThe device that performs all calculations.

Terminology - storage

giga- Billion gigabyte ~ 1,000,000,000

bytes. Actually = 230 bytes

(1,073,741,824). About 360,000 pages of text.

tera- Trillion terabyte ~ 1,000,000,000,000

bytes. Actually = 240 bytes

(1,099,511,627,776). About 366 million pages of

text.

Page 5: Introduction to Unix. Computer Hardware zCentral Processing Unit (CPU) yThe heart and brains of a computer. yThe device that performs all calculations.

Terminology - processing power

Clock speed The rate at which a CPU performs its most basic operations. CPU’s clock speed is measured in megahertz (MHz). Megahertz ~ million hertz (million pulses per second). 400 MHz CPU has a clock speed of 400,000,000 pulses per

second.

FLOPS Floating point operations per second.

MIPS Millions of instructions per second.

Page 6: Introduction to Unix. Computer Hardware zCentral Processing Unit (CPU) yThe heart and brains of a computer. yThe device that performs all calculations.

What is an Operating system?

A program.

Controls peripheral devices attached to computer.

Handles communication between the user(s) and the central processor (the computer).

Manages the way other programs are stored and run.

Common operating systems: Windows95/98, WinNT, Macintosh OS, Linux.

Page 7: Introduction to Unix. Computer Hardware zCentral Processing Unit (CPU) yThe heart and brains of a computer. yThe device that performs all calculations.

One user or many?

Most personal PCs (either Windows or Macintosh based) are single-user machines. 1 keyboard, 1 monitor, intended to serve just one person.

Large computer systems are multiuser systems. Still composed of the same 4 main components, but just made

to work with many people at once.

Page 8: Introduction to Unix. Computer Hardware zCentral Processing Unit (CPU) yThe heart and brains of a computer. yThe device that performs all calculations.

Multitasking & Timesharing

Unix is a multitasking operating system

It can do more than one thing at a time.

Uses timesharing to accomplish this

Works on one task at a time for very short amounts of time and rapidly switches between them.

Unix is also a multiuser operating system

Made to allow many people to use the computer at one time.

Page 9: Introduction to Unix. Computer Hardware zCentral Processing Unit (CPU) yThe heart and brains of a computer. yThe device that performs all calculations.

Components of Unix

Kernel The master control program of the computer.

Shell The part of Unix that interprets user commands and passes

them onto the kernel.

File System Information stored on the computer. Can be organized into directories.

Utilities Unix commands.

Page 10: Introduction to Unix. Computer Hardware zCentral Processing Unit (CPU) yThe heart and brains of a computer. yThe device that performs all calculations.

History of Unix

Designed to be portable — can be run on different computers.

Began in 1969 at AT&T’s Bell Labs (a.k.a. Lucent Technologies)

Became a multi-user, multi-tasking Operating System.

The original Unix was freely distributed and many different companies took it, modified it, added features and released their own versions.

Page 11: Introduction to Unix. Computer Hardware zCentral Processing Unit (CPU) yThe heart and brains of a computer. yThe device that performs all calculations.

Versions of Unix

Over time, two main versions came to be the most popular.

BSD (Berkeley Software Distribution)

System V (AT&T Bell Labs)

Most other versions of Unix are based on one of these two versions.

Solaris (Sun Microsystems)

SCO (Santa Cruz Operation)

HP-UX (Hewlett-Packard Unix)

Page 12: Introduction to Unix. Computer Hardware zCentral Processing Unit (CPU) yThe heart and brains of a computer. yThe device that performs all calculations.

Linux

Another version of Unix (sort-of).

Created by Linus Torvalds (as a graduate student in Finland).

Distributed freely.

Made to run on virtually all computers (especially PCs).

Red Hat is the most popular commercial distribution.

Page 13: Introduction to Unix. Computer Hardware zCentral Processing Unit (CPU) yThe heart and brains of a computer. yThe device that performs all calculations.

Is Unix dead?

No.

Many large companies still use Unix.

Most web-servers are Unix-based.

Page 14: Introduction to Unix. Computer Hardware zCentral Processing Unit (CPU) yThe heart and brains of a computer. yThe device that performs all calculations.

Unix on Campus

Alpha 1, 2 and 3

Main user computers

DEC Alpha Server

Digital UNIX 4.0D

Dual 3/533 Mhz Alpha CPUs with 4 Mb cache

1024 Mb RAM

170 Gigs user space

34 Gigs mail space

Batch1

Web server

DEC Alpha Server

Digital UNIX 4.0D

Quad EV-45/275 Mhz Alpha CPUs with 4 Mb cache

640 Mb RAM

32 Gigs of official web pages (220,000 files)

25 Gigs of personal web pages (420,000 files)

Page 15: Introduction to Unix. Computer Hardware zCentral Processing Unit (CPU) yThe heart and brains of a computer. yThe device that performs all calculations.

Logging In

Why do it?

Multi-user operating system.

Needs to know who you are.

User name, login ID, login, ID, etc.

Each one is unique.

System administrators set up rules for user names.

Password

Many systems have rules about acceptable passwords.

Keep it secret.

Page 16: Introduction to Unix. Computer Hardware zCentral Processing Unit (CPU) yThe heart and brains of a computer. yThe device that performs all calculations.

Logging in — How to do it.

From PC labs or home.

Run a telnet program.

From command prompt.

From shortcut set up for you.

Prompted for name and password.

Page 17: Introduction to Unix. Computer Hardware zCentral Processing Unit (CPU) yThe heart and brains of a computer. yThe device that performs all calculations.

Unix interface

Unix operates from a command prompt.

(alphaN) N:

Alphas use the EZ-Shell.

Exit the EZ-Shell with option 62.

Various GUIs do exist for Unix.

Page 18: Introduction to Unix. Computer Hardware zCentral Processing Unit (CPU) yThe heart and brains of a computer. yThe device that performs all calculations.

Xwindows

Created at MIT General protocol for running a GUI on Unix. Handles the communication between the terminal and

the server (main computer). You also need a “windows manager” to handle how the

windows will look on your computer.

Page 19: Introduction to Unix. Computer Hardware zCentral Processing Unit (CPU) yThe heart and brains of a computer. yThe device that performs all calculations.

Tab Windows Manager (twm)

Page 20: Introduction to Unix. Computer Hardware zCentral Processing Unit (CPU) yThe heart and brains of a computer. yThe device that performs all calculations.

Motif Windows Manager (mwm)

Page 21: Introduction to Unix. Computer Hardware zCentral Processing Unit (CPU) yThe heart and brains of a computer. yThe device that performs all calculations.

OpenLook Windows Manager (olwm)

Page 22: Introduction to Unix. Computer Hardware zCentral Processing Unit (CPU) yThe heart and brains of a computer. yThe device that performs all calculations.

Common Desktop Environment (CDE)

Page 23: Introduction to Unix. Computer Hardware zCentral Processing Unit (CPU) yThe heart and brains of a computer. yThe device that performs all calculations.

Once you log on

Messages Setting terminal type Shell prompt Changing your password

passwd

Obtaining help man [command name]

Page 24: Introduction to Unix. Computer Hardware zCentral Processing Unit (CPU) yThe heart and brains of a computer. yThe device that performs all calculations.

Logging out

How

Type “exit”

Type “logout”

Why?

Page 25: Introduction to Unix. Computer Hardware zCentral Processing Unit (CPU) yThe heart and brains of a computer. yThe device that performs all calculations.

Readings

Chapters 1 – 3 and Appendix B. Unix File System