0% found this document useful (0 votes)
31 views20 pages

A Crash Course in Supercomputing: UNIX

OAK RIDGE NATIONAL LABORATORY U. S. DEPARTMENT OF ENERGY Introduction to UNIX Motivation to create UNIX Creation of Linux y computers custom built by different vendors not interoperable y no standards, so programs must be completely rewritten for other platforms y Assign to users exclusive time blocks y Problem: inconvenient (what if your time is 2+4 a.m. Saturday?)
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views20 pages

A Crash Course in Supercomputing: UNIX

OAK RIDGE NATIONAL LABORATORY U. S. DEPARTMENT OF ENERGY Introduction to UNIX Motivation to create UNIX Creation of Linux y computers custom built by different vendors not interoperable y no standards, so programs must be completely rewritten for other platforms y Assign to users exclusive time blocks y Problem: inconvenient (what if your time is 2+4 a.m. Saturday?)
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd

A Crash Course in Supercomputing: UNIX

Rebecca Hartman-Baker Oak Ridge National Laboratory hartmanbakrj@ornl.gov


2004-2006 Rebecca Hartman-Baker. Reproduction permitted for non-commercial, educational use only.

OAK RIDGE NATIONAL LABORATORY


U. S. DEPARTMENT OF ENERGY

Outline
I. Introduction to UNIX II. Useful UNIX commands III. The vi editor

OAK RIDGE NATIONAL LABORATORY


U. S. DEPARTMENT OF ENERGY

I. Introduction to UNIX
y y y y History of computers Motivation to create UNIX Creation of UNIX Creation of Linux

OAK RIDGE NATIONAL LABORATORY


U. S. DEPARTMENT OF ENERGY

History of Computers
y Early computers (1940s, 1950s) had no operating system y Computers just number crunching machines y Computers had no keyboard, monitor, mouse, etc. y Input: cards; Output: line printer
OAK RIDGE NATIONAL LABORATORY
U. S. DEPARTMENT OF ENERGY

Rear Admiral Grace Hopper at UNIVAC machine, 1957. (2)

History of Computers
y Computers custom built by different vendors (or even same vendor!) not interoperable y No standards, so programs must be completely rewritten for other platforms

IBM Punch Cards (1950s-1970s) (2)

OAK RIDGE NATIONAL LABORATORY


U. S. DEPARTMENT OF ENERGY

IBM Desktop Hand-Operated Card Punch (1960s) (2)

Motivation
y Computer cost millions of dollars, so want to get the most use from it y Assign to users exclusive time blocks y Problem: inconvenient (what if your time is 2 4 a.m. Saturday?) y Must be better way to share resources!
OAK RIDGE NATIONAL LABORATORY
U. S. DEPARTMENT OF ENERGY

Illiac IV, A $31 million machine built in 1965 by the University of Illinois and Burroughs Computer Company. (2)

Creation of UNIX
y Ken Thompson and Dennis Ritchie at Bell Labs were impatient about resource sharing y So they designed operating system to handle multiple users on one computer y After a few failures, came up with UNIX operating system y UNIX became industry standard for mainframe computers
OAK RIDGE NATIONAL LABORATORY
U. S. DEPARTMENT OF ENERGY

Dennis Ritchie and Ken Thompson using UNIX on a machine at Bell Labs, 1972 (1)

Creation of Linux
y In 1991, Finnish college student Linus Torvalds announced creation of UNIXlike OS he wrote as hobby y Linux written for PC instead of mainframe architecture y Linux distribution available for free y Today, Linux used on servers, clusters, office computers, and many home PCs
OAK RIDGE NATIONAL LABORATORY
U. S. DEPARTMENT OF ENERGY

Linus Torvalds (1)

II. Useful UNIX Commands


y Concepts y Useful commands y Further help

OAK RIDGE NATIONAL LABORATORY


U. S. DEPARTMENT OF ENERGY

Concepts
y Linux has both GUI (graphical user interface) and command line interface y GUI similar to Windows, MacOS, etc. y Command line similar to DOS, identical to UNIX y Case sensitive: myfile, MYFILE, and MyFile are three different file names y One main difference between DOS and *nix: file separator in *nix is forward slash (/), not back slash (\)
OAK RIDGE NATIONAL LABORATORY
U. S. DEPARTMENT OF ENERGY

Useful Commands
y See UNIX commands handout y man is the most useful command ever (type man man to find out why!) y To remotely log in to UNIX/Linux machine: ssh username@machinename (e.g. ssh hqi@fourierdesk.ornl.gov) To log out, when you are done, type exit or logout and press enter
OAK RIDGE NATIONAL LABORATORY
U. S. DEPARTMENT OF ENERGY

Further Help
y Unix Tutorial for Beginners http://www.ee.surrey.ac.uk/Teaching/Unix/ y DOS to UNIX Translation http://www.mcsr.olemiss.edu/unixhelp/DO StoUNIX.html y UNIX Command Summary http://www.utexas.edu/cc/docs/ccug1/com mandsum.html
OAK RIDGE NATIONAL LABORATORY
U. S. DEPARTMENT OF ENERGY

III. The vi Editor


y y y y History of editors Creation of vi vi concepts Useful vi commands

OAK RIDGE NATIONAL LABORATORY


U. S. DEPARTMENT OF ENERGY

History of Editors
y No editors for cards y Upon invention of terminal, line editor ed created y ed consisted of 24line terminal, no ability to scroll back

DEC PDP 12 Console, 1969 (2)

CDC 6600 Supercomputer Console, 1964 (2)

OAK RIDGE NATIONAL LABORATORY


U. S. DEPARTMENT OF ENERGY

Creation of vi
y In 1975-76, Bill Joy was grad student at Berkeley y Dissatisfied with ed, he and his friends hacked around on ed and made improvements y Joy and Berkeley counterparts gave away vi to everybody y Thus vi became part of basic UNIX y Every *nix system has vi, while not all have other editors such as emacs and pico
(1)

OAK RIDGE NATIONAL LABORATORY


U. S. DEPARTMENT OF ENERGY

vi Concepts
y Two modes:
 Command Mode: Enter commands to delete, cut, paste, save, quit, etc.  Text Entry Mode: Type characters in file

y If you cant tell which mode youre in, press ESC and you will then be in command mode y vi is case-sensitive: J and j do very different things! y To use vi: at command prompt type vi filename to edit file filename (or can just type vi without filename to open new buffer)
OAK RIDGE NATIONAL LABORATORY
U. S. DEPARTMENT OF ENERGY

Useful vi Commands
y See vi commands handout y Getting into text entry mode: type i a o or O in command mode y . redo most recent command y u undo most recent command y $ go to end of line y 0 (zero) go to beginning of line
OAK RIDGE NATIONAL LABORATORY
U. S. DEPARTMENT OF ENERGY

vi Resources
y vi Editor Tutorial http://www.ualberta.ca/HELP/gpu/vi.html y List of Commands for vi Unix Editor http://www.chem.brown.edu/instructions/v i.html y Basic vi Commands http://www.cs.colostate.edu/helpdocs/vi.ht ml y vi Lovers Home Page http://thomer.com/vi/vi.html
OAK RIDGE NATIONAL LABORATORY
U. S. DEPARTMENT OF ENERGY

Bibliography/Resources
y The Creation of the UNIX* Operating System http://www.bell-labs.com/history/unix/ y History of UNIX and Linux http://www.computerhope.com/history/unix.htm y Biography of Linus Torvalds http://www.brainyencyclopedia.com/encyclope dia/l/li/linus_torvalds.html y Interview with Bill Joy http://www.cs.pdx.edu/~kirkenda/joy84.html
OAK RIDGE NATIONAL LABORATORY
U. S. DEPARTMENT OF ENERGY

Bibliography/Pictures
y (1) UNIX/Linux Picture Gallery (people) http://penguin.dcs.bbk.ac.uk/academic/unix/linu x/slides/ y (2) Lexicons History of Computing (computer hardware) http://www.computermuseum.li/Testpage/02HIS TORYCD-Index.htm

OAK RIDGE NATIONAL LABORATORY


U. S. DEPARTMENT OF ENERGY

You might also like