a sta rsiweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · contents what is a thena, anyw a y?. 1 a...

69

Upload: others

Post on 19-Oct-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

Introduction to AthenaRSI 2006 Sta�

Page 2: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

ContentsWhat is Athena, Anyway? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1Athena Rules of Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2Athena Rules of Use | Continued, Ethics . . . . . . . . . . . . . . . . . . . . . . . . 3Athena Cluster Manners . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4Password Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5How Do I Find a Workstation? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6Logging In . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7The Screen Before You . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8Metacity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9Shell? That looks like a window to me. . . . . . . . . . . . . . . . . . . . . . . . . . 10Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11Files and their names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12The Shell Seven . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13The Nickel Tour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14The Nickel Tour Continued... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15The Nickel Tour Continued... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16The Nickel Tour Continued... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17The Nickel Tour Continued... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18The Nickel Tour Continued... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

Page 3: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

The Nickel Tour... The End . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20Manipulating Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21Moving Within Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22Directories Redux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

~, ., .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24Copy is a Sometimes Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25Movin' on up. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26Get It Outta Here! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27Public, Private, www and OldFiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28What's the & for? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29I want my prompt back! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30Changing Your Password . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31Renewing Your Tickets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32Options and Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33It Started with a \C" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34I Want less! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35One Page at a Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36Quotas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37Safer Deletion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38Printing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

Page 4: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

Checking Printer Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40Removing a Print Job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41Emacs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42Emacs: What you see . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43Minibu�er? But I Just Met Her! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44Emacs Command Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45When Bad Things Start to Happen . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46Manipulating Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47Manipulating Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48Search and Replace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49Accessing your MIT email . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50Lockers, More Than Places To Leave Bodies . . . . . . . . . . . . . . . . . . . . . . 51Which Locker? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52A Few Useful Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53A Few Not Altogether Useful Programs . . . . . . . . . . . . . . . . . . . . . . . . . 54Running Firefox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55Zephyr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56Personal Zephyrs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57Is There Anybody Out There? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58RSI Zephyr Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59Don't Be Overwhelmed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60Online articles and databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61Workstation Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62Logging Out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63Accessing your account from o� campus . . . . . . . . . . . . . . . . . . . . . . . . . 64Getting Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

Page 5: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

What is Athena, Anyway?

• MIT's general computing system(E-mail, Internet access, text editing, spreadsheets, etc.)

• Workstations• Home directories (1 GB quota)• Printers

• Mostly Unix and Linux machines

1

Page 6: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

Athena Rules of UseDon't violate the intended use of Athena. Full descriptions ofand reasoning for the rules can be found at:

http://web.mit.edu/olh/Welcome/rules.html

• Don't let anyone else use your account

• Don't impersonate other individuals in communications

• Don't attempt to capture or crack passwords

• Don't destroy other people's data• Don't use Athena for �nancial gain• Don't transmit harassing materials ([email protected])• Don't eat stu�. Ever. 2

Page 7: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

Athena Rules of Use | Continued, Ethics

• Don't let anyone know your password

• Don't violate the privacy of other users

• Don't copy or misuse copyrighted material• Don't use Athena to harass anyone in any way• Don't send SPAM or forward chain letters

3

Page 8: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

Athena Cluster Manners

• Don't bring food or drink into the cluster

• Don't turn o� power to equipment

• Don't recon�gure the hardware or software

• Don't login to multiple workstations at a time

• Don't leave your workstation unattended• Don't be loud

• Don't be a printer hog | print only one copy of a document,split large jobs into sections

4

Page 9: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

Password SecurityAs mentioned above, you must keep your password secure.

• Don't let anyone know your password

• No o�cial person, including Athena help (or TAs), will everneed your password. Don't give it to them!

• Don't let anyone know your password• Choose a password that is secure (e.g., not your name or123456)

• Don't let anyone know your password, ever5

Page 10: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

How Do I Find a Workstation?The easiest clusters to �nd are

• 2nd Floor, Simmons (Shared with MITES)

• w20-575 (5th oor of the Student Center)

• 1-142 (1st oor of building 1)• Rotch basement, 12-182, Barker (Along the In�nite)

• 37-318, 37-332 (Building 37)• 56-129, 66-080 (Near East Campus)• Quickstations (various places, buildings 16 and 11, etc.)

To see a full map (or for cluster hopping), use cview or xcluster.6

Page 11: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

Logging InYou only need two things to log in:• username (e.g., jdoe)• password

Note: you will not see your password on the screen as you typeit.

7

Page 12: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

The Screen Before YouThe default screen has several notable features:

• GNOME panel (the toolbar at the bottom)

• Terminal window (the big thing on the left)

• Console (upper right)• Logout button (lower right on GNOME panel)• Command Line / Prompt (in the xterm window, it startswith athena%)

8

Page 13: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

MetacityMetacity is the program that controls the appearance ofthe screen and the way the windows function. Some simplemanipulations:• Click (with left mouse button) and drag the titlebar to movethe window• Corners and side borders resize• Three buttons in the top right:Leftmost iconi�esMiddle maximizesRightmost closes

• Top left corner gives you a menu 9

Page 14: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

Shell? That looks like a window to me.In Unix systems, the shell is the interface between the user andthe computer. When you type a command into the shell at theprompt and press the "Return" key, the computer will do it.For example, you run programs from the shell by typing thename of the program. Try typing the following commands inyour xterm window:athena% whoami

athena% tellme combo

athena% xclock &

10

Page 15: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

DirectoriesDirectories are like folders where other �les and directories canbe stored.When you �rst log in, your shell starts out in a special directorycalled your home directory. Most (if not all) of your personal�les will be stored here.The directory that your shell is in at any time is called the\current directory." If your forget what directory you're in, usethe command pwd to �nd out where you are.11

Page 16: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

Files and their namesYou can name �les almost anything you want with a fewrestrictions:• 255-character maximum• No special characters (letters, numbers, hyphens, periods,and underscores are allowed)• Spaces are allowed but try not to use them becuase �le nameswith spaces require special handling on the shell.

• All names are CaSe sEnSItiVeIts also a good idea to give �les a meaningful extension like .txtor .pdf This isn't required but helps you and others rememberwhat types your �les are.Good �le name: My Text File.txtBad �le name: tHIs FILEN#ME rule$ 12

Page 17: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

The Shell SevenThere are tens of thousands of commands that you can runfrom the shell. Fortunately though, you only really need a fewto get along just �ne.• ls - Lists the contents of the current directory

• cd - Change directory• rm - Removes (deletes) one or more �les or directories

• mv - Move/rename a �le or directory• cp - Copy a �le or directory• mkdir - Create a new directory• rmdir - Remove a directory 13

Page 18: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

The Nickel Tourathena% cd

athena% pwd

/afs/athena.mit.edu/user/d/c/dcarr

athena% ls

14

Page 19: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

The Nickel Tour Continued...

athena% mkdir a dir

athena% ls

a dir/

athena% cd a dir

/afs/athena.mit.edu/user/d/c/dcarr/a dir

athena% ls

15

Page 20: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

The Nickel Tour Continued...

athena% touch a file

athena% ls

a file

athena% mv a file new name

athena% ls

new name

16

Page 21: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

The Nickel Tour Continued...

athena% ls

new name

athena% cp new name a copy

athena% ls

a copy new name

17

Page 22: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

The Nickel Tour Continued...

athena% rm a copy

athena% ls

new name

athena% rm new name

athena% ls

18

Page 23: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

The Nickel Tour Continued...

athena% pwd

/afs/athena.mit.edu/user/d/c/dcarr/a dir

athena% cd ..

athena% pwd

/afs/athena.mit.edu/user/d/c/dcarr

19

Page 24: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

The Nickel Tour... The End

athena% ls

a dir

rmdir a dir

athena% ls

20

Page 25: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

Manipulating Directories

• To make a new directory:athena% mkdir foo

• To remove an empty directory:athena% rmdir foo

• To list the contents of the current directory:athena% ls

21

Page 26: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

Moving Within DirectoriesThe command to change directories is cd <directoryname>.Simply typing cd will return you to your home directory.Let's say stewieG has the directory bar in his foo directory.

• Within foo, he could typeathena% cd bar

• From anywhere, he could typeathena% cd /mit/stewieG/foo/bar

• pwd prints your current directory.athena% pwd

/afs/athena.mit.edu/user/s/t/stewieG

22

Page 27: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

Directories ReduxThe location of a �le or directory is speci�ed by its path. In thepath, di�erent objects are separated by a forward slash (/).Absolute paths start with a forward slash. Example:

/mit/USER/.anyoneRelative paths do not start with a slash and specify a locationrelative to the current directory. Example:If you are in /mit/stewieG, then Public/foo.tex refers to

/mit/stewieG/Public/foo.tex.

23

Page 28: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

~, ., ..If you leave your home directory, you may need to refer to it asthe starting location of a path. You can do this with a tilde.

~/foo/bar.tex is the same as /mit/USER/foo/bar.texEvery directory contains two special directories: . and ..• . refers to the current directory• .. refers to the directory one level up.

24

Page 29: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

Copy is a Sometimes CommandThe command to copy �les is cp. It takes two paths asarguments. There are two main usages:

• Copying one �le to a new location with a new name:

athena% cp foo.tex ~/bar/baz.tex

• Copying �les in a directory to another directory:athena% cp * ../foo/

25

Page 30: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

Movin' on up. . .The mv command also has two main uses:

• Moving without keeping a copy in the original location:

athena% mv foo.c bar/

• Renaming �les:

athena% mv foo.c baz.c

26

Page 31: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

Get It Outta Here!If you are reaching the end of your quota, or you just have �lesyou no longer need, you can remove or delete them.

• rm is the standard UNIX command. This permanently getsrid of the �le and can't be reversed.• Well, almost. If your �le existed overnight, you can temporarily�nd a copy of it under the OldFiles subdirectory of your homedirectory.

27

Page 32: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

Public, Private, www and OldFilesThere are some special directories that every user has bydefault:• Public: all �les in the Public directory are readable by anyone.This is a good way to share data without giving someone elseyour password.• Private: This is the opposite. Other users can't even get adirectory listing of this folder; only you have access.

• www: Your web page goes here.• OldFiles: A snapshot of your home directory from yesterday.If you accidentally delete something, look here. 28

Page 33: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

What's the & for?So why are some commands followed by ampersands (&)?When you run a program without &, you don't get your promptback until the program �nishes. This means that if the programopens up a new shell, you can't have your prompt back untilthe program is �nished. Now suppose you want to check emailwhile your xclock is open . . .The ampersand in xclock & causes xclock to run withoutstealing your prompt (called \running in the background"), soother programs can be run simultaneously.

29

Page 34: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

I want my prompt back!If you accidentally run a program without the &, you can stopit by holding down the [Control] key and pressing z. Your shellshould say \Suspended," and you will get your prompt back.Now type bg at the prompt to restart the stopped program inthe background.Conversely, if you need to move a backgrounded program tothe foreground, say fg to your prompt.To kill a program instead of suspending it, use Control-Cinstead of Control-Z.

30

Page 35: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

Changing Your PasswordYou should change your password from time to time, especiallyif you think someone else might know it:

athena% passwd

You will �rst be prompted for your old password. Then youmust enter your new password twice to ensure that you don'thave a typo in your new password.Your new password should be something you can remember, butthat others can't easily guess. Never write down your passwordor give it to anyone else. Don't tell anyone your password.31

Page 36: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

Renewing Your TicketsFor security reasons, if you're logged in continuously for morethan 10 hours, you will not be able to access your �les until youtype "renew" at the prompt and enter your password, like so:

athena% renew

Password for [email protected]:

32

Page 37: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

Options and ArgumentsLet's use the ls command to learn about options andarguments.• Options modify the action of the program. For example,you can use ls -a to view all �les (including normally hiddenones). ls -l shows a long form of the information.

• Arguments tell a program what it should act on. For ls thearguments are the names of the �les or directories to list.If no argument is given, the default is the current directory.Example:

ls ~/Paper shows the �les in your own Paper directory33

Page 38: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

It Started with a \C" . . .If you want to specify several �les at once there are two kindsof \wildcards" you can use:• * matches 0 or more characters. Example:

athena% ls P*

• ? matches any one character. Example:athena% ls /mit/rsi/200?

• These two modi�ers can be used together.34

Page 39: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

I Want less!less is a program that displays text �les one page at a time.

athena% less ~/.anyone

• [space] scrolls forward one screen• b goes back one screen• Arrow keys move text forward or backward line by line

• q quits

35

Page 40: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

One Page at a Timeless can be used to break up the output of other programs intoneat, page-sized chunks. Tryls -al | lessto see an example. The pipe operator, |, is used to send theoutput of the command on the left to the command on theright as input.

36

Page 41: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

QuotasEvery user has a �le quota of 1 GB. There are two di�erentways to check your quota and see how much room you have.

• athena% quota -v

37

Page 42: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

Safer Deletion• delete is an Athena-ism that is reversible. It's like the trashcan or recycling bin on MacOS or Windows, except that itis automatically emptied every few days.

• undelete retrieves deleted �les; just type undelete <filename>.

• To empty the trash, use purge.• lsdel is like ls but lists deleted �les.

38

Page 43: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

Printing• lpr is the basic printing command and has the syntax:

athena% lpr foo.ps

• You can use the -P option to specify a printer:

athena% lpr -P<printer name> foo.ps

• To print double-sided, add 2 to the printer name:

athena% lpr -P<printer name>2 foo.ps

Warning: lpr prints PostScript �les and plain text correctly.DO NOT try to print a PDF or DVI or any binary graphics �leusing lpr. Doing so will make the printer spew mountains ofgarbage. 39

Page 44: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

Checking Printer Status

• lpq -P<printername> gives you the status of a printer. It tellsyou whether the printer is out of paper or otherwise out oforder and lists all the jobs waiting to print on it.

• lpq without an argument tells you your default printer andits status.

• cview printers lists the status of all printers in all publicclusters.

40

Page 45: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

Removing a Print JobIf there is a problem with a printer, you may need to print ona di�erent printer. When you do this, be sure to remove youroriginal job from the queue by using lprm.

• lprm -Phelios 492 517 removes your print jobs on the printer

helios with job numbers 492 and 517. (The job numbersappear in the output from lpq.)• lprm -Phelios removes your top print job from helios• lprm all by itself removes all your print jobs from your defaultprinter.Remember this command in case you accidentally lpr a DVI orother evil binary �le. 41

Page 46: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

Emacsemacs is a text editor. It is not a word processor. It is a texteditor. It can do just about anything, including making co�ee.You can run emacs in two ways:• athena% emacs foo.tex &opens the �le foo.tex if it exists and creates foo.tex if itdoesn't exist.

• athena% emacs &

42

Page 47: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

Emacs: What you see

• Menu Bars• Buttons• White space• Minibu�er

You can do a lot of stu� through the menus and with thebuttons and your mouse, but there are a lot more commandsyou can access with just the keyboard, which, once you getused to, will make using emacs much faster. And, of course,you'll have to use the minibu�er whether you use the mouse orthe keyboard . . . 43

Page 48: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

Minibu�er? But I Just Met Her!The minibu�er is the bottom line of the emacs window. Itdisplays commands and messages. It is a source of many helpfulthings, such as con�rmation that your �le is saved or a promptto �nish out a command.When you are typing emacs commands, you're using theminibu�er.

44

Page 49: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

Emacs Command SyntaxA brief description of our syntax:

• C-x means hold down the [Control] key and press x• C-x u means hold down the [Control] key and press x, thenrelease the [Control] key and hit u• C-x C-s means hold down the [Control] key and press xfollowed by s before letting go of [Control]• M-x means to hold down the [Alt] (also called the [Meta]key)and press x

45

Page 50: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

When Bad Things Start to HappenMany key combinations have special meanings in emacs, andit's easy to invoke a weird command by mistake. When thishappens, don't panic: there are ways out.If you get stuck in the minibu�er typing to a prompt you don'trecognize, press ESC a few times. This should get you out ofwhatever trouble you were in (you'll see the word \Quit" in theminibu�er).The undo command in emacs has two key sequences: C-x u and

C- (control-underscore). If you suddenly delete a bunch of yourpaper by mistake, using either of these commands should bringit back. You can undo several consecutive actions by using theundo command repeatedly.

46

Page 51: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

Manipulating Files• C-x C-f opens an existing �le or creates and opens a new �le.You will be prompted in the minibu�er for the name of the�le to open.• C-x C-s saves the �le you are working on. Use this often.

• C-x C-c quits emacs.

47

Page 52: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

Manipulating Text• C-w Cut (\wipe")• C-y pastes (\yanks") what was most recently cut or copied

• C-k cuts the line to the right of the cursor• M-q reformats current paragraph

48

Page 53: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

Search and Replace

• To �nd the next occurrence of a string in your �le, press C-sand begin typing the string. emacs will search as you type. Youmay press return to leave the search or press C-s repeatedlyto �nd the second, third, and following occurrences of thestring.

• C-r is like C-s but searches backwards.• To replace all occurrences of foo with bar in your �le, goto the beginning of the �le, then press C-M-%. Yes, thats

Ctrl-Alt-Shift-5!! Enter foo and press return; then enter barand press return.

49

Page 54: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

Accessing your MIT emailYou have several options:• Thunderbird Email Client: thunderbird• Pine email client: pine• http://webmail.mit.edu

• Forward to another address: chpobox -s [email protected]

50

Page 55: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

Lockers, More Than Places To Leave BodiesThe place where the �les in your account live is called a locker.Many groups also have lockers that contain programs or datathat you might �nd useful. You can access other lockers using

add.Before running programs in a locker called <lockername>, youneed to say add <lockername>. For example, after add math youcan use Mathematica by sayingathena% mathematica &

51

Page 56: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

Which Locker?What if you don't know the name of the locker containing yourprogram?To see a partial list of programs available on Athena, includingthe lockers containing them, see the \What Runs Where" pageat

http://web.mit.edu/acs/www/whereruns.htmlIf you know the name of the program you want, just sayathena% whichlocker <programname>

52

Page 57: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

A Few Useful Programs

• gnome-dictionary: A good graphical dictionary.

• webster <word>: A command line dictionary.

• thesaurus <word>: A command line thesaurus.

• date: Gives you the time and date. Don't ask it out.

• gnumeric &: A spreadsheet program (similar to Excel). In the

gnumeric locker.

• xess &: Another spreadsheet. Accessible via GNOME menuor in the xess locker.

• gcalctool &: A graphical calculator. 53

Page 58: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

A Few Not Altogether Useful Programs

• xeyes &: Eyes that follow you around.

• xsnow &: When the Cambridge summer becomes unbearable.

• xturtles &: Turtles.• oneko &: A graphical cat chases your mouse cursor. Get it?

• punt program name: Forcibly closes program name. Use wisely, asin if you've decided that you've seen one too many turtles,you can close xturtles with punt xturtles. Not unlike Ctrl-Alt-Delin Windows.

54

Page 59: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

Running FirefoxFirefox is the web browser on Athena. To run Mozilla Firefoxyou have two options:

1. Click on the WWW button on the left side of the GNOMEpanel.2. Type \firefox &" at the athena% prompt.

3. If met with a harrassment window about lock �les, select\Delete lock �le and proceed" and proceed.55

Page 60: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

ZephyrZephyr is an instant messaging system for Athena that isvaguely analogous to AIM and ICQ but better. It's very exibleand kills time like nothing else in this world. A few points ofetiquette:• Don't be annoying• Don't spam large groups• Don't send huge zephyrs (use line breaks!)• Don't abuse the system

56

Page 61: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

Personal ZephyrsTo send someone a personal zephyr, simply type:

athena% zwrite doctordre

Write your message, and then type C-d or a period on a line byitself to send the message.You can write to several people at once:athena% zwrite lilflip 50 gggggggunit

57

Page 62: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

Is There Anybody Out There?

• The command znol -l will list the people who are now loggedin and the machines they are on.

• If you omit the option -l, you will thereafter receive a zephyrnotifying you each time someone logs in or out.

• You can also say xzul & to open a window that maintainsa list of who is online. Click and hold the mouse over ausername to see that person's location.• If you are looking for one speci�c user, say zlocate joeuserinstead of znol -l.

58

Page 63: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

RSI Zephyr ClassesRSI has two zephyr classes to which you can subscribe andwrite.• rsi-talk is a social zephyr class. Anything can be discussedhere, but please remember that more than 100 people maybe reading what you write. zrsion turns it on,

zrsioff turns it o�, zrsi sends a message to the class.

• rsi-help is a class for asking questions on any topic frommath to Athena to chemistry to writing styles. Please makeyour queries as speci�c and thorough as possible; don't justsay, \Help! It doesn't work!" RSI alumni from many yearspast will be listening to answer your questions.zrsihelp sends to this class. zrsihelpon turns it on, zrsihelpoffturns it o�. 59

Page 64: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

Don't Be OverwhelmedA few more comments to make your zephyr-life happier:

• You can get rid of a bunch of zephyrs at once by holdingdown the [Control] key and clicking on the stack of zephyrs.

• To copy something from a zephyr, hold down the [Shift]key and highlight the text you want.

• If you accidentally do znol without the -l option and all ofthe logging in/logging out messages are annoying you, znoloff will stop them.

• You can also always do zrsioff and zrsihelpoff if you wantto stop getting those messages.• If someone is bothering you and you want to stop gettingmessages from them, you can use zpuntuser. To start gettingmessages from them again, use zunpuntsuer. 60

Page 65: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

Online articles and databasesTo �nd articles on your research topic, check out:

1. MIT library homepage - http://libraries.mit.edu/2. ProQuest - http://libraries.mit.edu/get/proquest

3. Individual journal web pages

4. JStor - http://www.jstor.org/

5. Lexis Nexis - http://web.lexis-nexis.com/universe

61

Page 66: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

Workstation SecuritySecurity is an important aspect of the Athena system. Theeasiest way for an intruder to break into the system is by gettinga password or using an unattended workstation. There is a wayto secure your terminal:• xlock

62

Page 67: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

Logging OutOnce you're �nished using your workstation, log out usingthe logout command or clicking on the logout button. If thecommand tells you that there are suspended jobs, bring them tothe foreground using fg as we talked about earlier. Close themand logout again.

63

Page 68: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

Accessing your account from o� campusSeveral options:1. ssh [email protected]

2. ssh [email protected]

3. http://athena.dialup.mit.edu

4. http://webmail.mit.edu

64

Page 69: A Sta RSIweb.mit.edu/rsi/www/2013/files/athena-tut.pdf · Contents What is A thena, Anyw a y?. 1 A thena Rules of Use. 2 A thena Rules of Use | Continued, Ethics. 3 A thena Cluster

Getting Help• Online Help has some information at http://web.mit.edu/olh/• There is a good FAQ/Stock Answers site at

http://web.mit.edu/answers/

• Reference Manual entries are available for most commands.To get more information about a command type

athena% man <command>

• The RSI FAQ is on the RSI web page athttp://web.mit.edu/rsi/www/2006/help/faq

• zrsihelp is also available to answer your questions. Onceagain, please be speci�c. That means not \HELP! My computerdoesn't work!" or \My turtles are missing!" We don't knowwhat happened to your tasty turtles. 65