UMass Amherst
Department of Mathematics and Statistics
Directory  Courses  Undergraduate  Graduate  Research  Seminars  Calendar  Contacts  Resources  Donate  
RCF  Math/Stat Res Ctr  OWL Login  SPIRE  Links  US Math Depts  For Dept Members  

Using the Sun Sparcserver for the First Time

Introduction

  The RCF main computer is now the SUN Enterprise 250 Server, currently named thales. Thales currently runs SOLARIS version 2.7, which is an AT&T System V Unix, referred to hereafter as `Unix'. This document contains some introductory information about the new machine and the Unix operating system.

Logging In

  To start utilizing your account, you must log-in to one of the many computers available to you in room 1537, room 1422,or your office, to name a few. In order to do this, you must have a Username and a Password. The RCF will set your permanent username and your initial password. You can change your password at anytime, see section 4.1 below for more details. Lets say, for example, we want to log into computer #4 in 1537. The login session will look like this:

UNIX(r) System V Release 4.0 (thales)

login: username
Password: password

It is VERY important that you use all lower-case letters when entering your username. Your password can have both lower and upper-case symbols, but you must enter it as you have set it. Unix is extremely picky about this.

After you have logged in, you will see:

Sun Microsystems Inc. SunOS 5.9 Generic May 2002
You have mail.
rcf1537-4%

At this point, you may begin entering commands.

Using mail

  Electronic mail is a very convenient method for communication with colleagues locally, nationally, and internationally. There are several ways to read and send mail, but the RCF is recommending that you use the PINE mail program. This program has several user-friendly attributes. These include a good system for organizing your mail in a logical manner, on-screen help (including a list of possible actions), and prompting for various mailing options. PINE also makes you confirm that you want to delete a message, so you are a bit less likely to delete messages by accident. The major advantage for using PINE is that because of its simple design, viruses have a hard time using it in their dastardly attempts to proliferate.

To start the PINE mailer, simply type pine at the system prompt. The first time you do this, PINE will ask you a few questions about how you want your mailer set up. Just answer yes to take the system defaults; when you learn more about how PINE works, you can modify PINE.

Useful Unix Commands And Utilities

  As mentioned above, thales runs SOLARIS version 2.7, an AT&T System V Unix. Unix has a very large and powerful command set. Many of the commands are the same as BSD Unix, but with different flags, others are virtually the same as BSD Unix, and still others are totally different. In addition, the RCF has written several utilities (called scripts) to make certain widely used commands more user-friendly. The following are brief descriptions of several useful and informational commands that every user should be aware of. Most of these have additional parameters that can be used with them that are not described here. If you would like additional information on Unix commands, you should consult the on-line manual pages - see section 4.2 below for details on how to do this. If you still need help, you should talk with an RCF staff member.


passwd

  The passwd command is used to change your password. You should feel free to change your password - but take care to choose it carefully. A good password should be difficult for anybody else to guess. Ideally, a password should not be a word found in a dictionary, your office number, your first or last name, or other similar things. Misspelled words are a good choice - particularly if they are entered in mixed case. Also, use symbols like $% or *# for some *#@%&*-ing variety.

Never tell your password to anyone. The RCF may ask you to change an obvious password detected by security programs, but no RCF member will tell you what to change it to nor ask you what your password is.

When you enter the passwd command, you will first be asked to enter your current password. Next you will be prompted for a new password, and then asked to type the new password again to be sure that you did not make a mistake in entering the new password. The characters you type will not be displayed as you type them. This is so nobody else can read your password from the screen while you are changing it. Below is an example of what a password change would look like on the screen for user tuthill.

tuthill@rcf1537-6% passwd
Changing password for tuthill
Old password:
New password:
Retype new password:
tuthill@rcf1537-6%


man - On-line Manual Pages

man is the command used to access the on-line reference manual pages. Suppose you wish to read more about the passwd command mentioned in section 4.1, if you type man passwd at the prompt, the screen will soon fill with information about how the passwd command works. Obviously, this requires that you know the command name. If you do not know a command name, getting on-line help is not the easiest thing to do. You can use man -k keyword, where keyword is a word that appears in the command description. This is vague, but as you will find out, so is man ! The manual pages can be a bit difficult to decipher, but you can ask the RCF for help reading them. You can also look in any of several books that the RCF has in room 1537.


finger

  Finger is a utility that shows who is currently logged on the system. You invoke it simply by entering finger at the prompt:

pollard@rcf1537-6% finger

Login       Name               TTY       Idle    When    Where
kieffer  Gordon Kieffer        pts/0          Tue 07:49  rcf1537-2             
decheng  Decheng Wang          pts/3          Tue 10:19  diffusion             
tuthill  Rick Tuthill          pts/2     1:33 Fri 10:54  rcf1537-4           
dhayes   David Hayes           pts/1       25 Tue 09:26  qmodz               
joeh     Joe Horowitz          pts/5        4 Tue 09:15  talos             
kieffer  Gordon Kieffer        pts/6        6 Tue 10:28  v90-233-60.dialup.um
rkrantz  Walter Rosenkrantz    pts/7          Tue 09:51  gin
scott    Scott F. Conti        pts/8          Tue 10:12  zoom                
decheng  Decheng Wang          pts/9        3 Tue 10:26  parmenides.gang.umas
The Login field is the Username of the person logged in; Name is their ``real'' name; TTY is the terminal number; Idle is the time between ``now'' and the last time they executed a command; When is when they logged in; and Where is the place they have logged in from.

The finger command can also be used to look up information about a specific user. For example, finger john will generate a list of all people on the system whose first name, last name, or username is john. When finger is used this way, you will get the login, real name, last login time, and other system information on each person fingered. The ``other system information'' includes when mail was last read and the person's plan. The plan is information the user wants to appear in their finger information. If you create a file named .plan (the period before the word plan is needed) in your top level directory, the contents of that file will be printed when another user fingers you. One of the differences between BSD Unix and Solaris Unix is in what finger information is printed. If you type finger john@rcf1537-6, you will get the rcf1537-6 finger information on john. This will include office and phone numbers (if available) in addition to the other information. Here is an example of what you might see; lets finger user stmary at rcf1537-6:

pollard@rcf1537-6% finger stmary

[rcf1537-6] 
Login name: stmary                      In real life: Don St Mary 
Directory: /u2/users/dlk/stmary               Shell: /user/bin/csh
Last login Sep 3 09:49 on pts/38 from wave.math.umass.edu
New Mail recieve Tue Sept 10 09:14:02 2002
  unread since Mon Sep  9  20:49:16 2002
No Plan.
pollard@rcf1537-6%

ls - List Contents of Directory

  The ls command lists the contents of the directory you are currently in. (If you want to check what directory you are in, use the pwd command which stands for ``path of working directory''). The following are examples of the ls command, with and without flags:

thales% ls

GradeProgram.tar.Z   latex2e-docs        simmons
NTD                  misc                talks
act-ay96.tex         papers              template.tex
auctex.tar.gz        setacct             thesis
ls without flags lists the contents of the directory

thales% ls -l

-rw-r--r--   1 kieffer  grad      124615 Feb 24  1995 GradeProgram.tar.Z
-rw-------   1 kieffer  grad        1474 Mar 25  1994 NTD
-rw-r--r--   1 kieffer  grad        4710 May 17 13:58 act-ay96.tex
-rw-r--r--   1 kieffer  grad      257021 May 11  1996 auctex.tar.gz
drwxr-xr-x   2 kieffer  other       1024 Aug  2 07:20 latex2e-docs
drwx------   2 kieffer  grad         512 Aug  2 07:19 misc
drwx------   2 kieffer  grad         512 Aug  2 07:18 papers
-rwx------   1 root     other        261 Aug  5  1994 setacct
drwx------   5 kieffer  grad         512 Aug  2 07:20 simmons
drwxr-xr-x   3 kieffer  grad         512 Aug  2 07:18 talks
-rw-rw-rw-   1 kieffer  grad       29297 Nov  8  1995 template.tex
drwx------   9 kieffer  grad         512 Aug  2 07:19 thesis
ls -l lists in long format (reading left to right) permissions, number of links to file, owner of the file, the group the owner belongs to, number of characters or bytes, time of last modification, and the filename for each file in the directory.

thales% ls -F

GradeProgram.tar.Z   latex2e-docs/        simmons/
NTD                  misc/                talks/
act-ay96.tex         papers/              template.tex
auctex.tar.gz        setacct*             thesis/
ls -F lists your files with a slash (/) after each filename if the file is a directory, an asterisk (*) if the file is an executable, and an "at" symbol (@) if the file is a symbolic link

There are many parameters to the ls command to display specific information about the files. You can read about these using the man command from section 4.2.


chmod - Change Permissions

The chmod command is used to change permissions on a file. Permissions are indicated as follows,

-rwxrwxrwx
where r means the file is readable, w means the file is writable and x means the file is executable. The first three permissions are for the owner, the second three are for the group and the last three are for everyone else. There are eight possible combinations for each set of rwx.

OctalBinaryPermissions

0000none
1001--x
2010-w-
3011-wx
4100r--
5101r-x
6110rw-
7111rwx

Thus

thales% chmod 721 setacct

will set the permissions on the file setacct to

-rwx-w---x

rm - Remove File

  The rm command is used to remove (delete) files. It is very easy to use. Simply type: rm filename where filename is the name of the file that you want to delete. Later on, you will learn how to use wildcards (*) to operate on more than one file at a time. With rm this can be very risky - you can easily delete additional files unintentionally. Be extremely careful whenever using this command with a wildcard.

A safer alternative to the rm command is del . This will force the computer to ask you to confirm any file deletions. For example, suppose you have a file called paper1.tex that you want to remove. If you enter rm paper1.tex at the shark10% prompt, the computer will remove the file. But if you enter del paper1.tex instead, the screen will print

rm: remove paper1.tex (y/n)?
You now answer y or n and hit return. Using del takes a bit longer, but is safer.

cp - Copy File

  The cp command copies one file to another name or another place. For example:

thales% cp intro.tex oldintro.tex

This will copy the file intro.tex to a new file named oldintro.tex while keeping intro.tex exactly as it was. These two files will be identical except for their name. It is a good idea to use cp to make ``backup'' versions of files to prevent accidental destruction.

Often you want to copy a file from one directory to another. In this case, you have to include the location of the file as part of the file name. Suppose, for example, you wish to copy the file algebra.tex from your account to a subdirectory called papers. You would type

thaless% cp algebra.tex papers/newname

where newname is the new name you choose for the file in the new location. If newname is . (a single period), the new copy will have the same name as the original.

If you wish to move the location of a file, or change its name, you would use the mv command. This works just like the cp command, but it does not leave the old file - it creates a new file with the same contents and removes the old file.

cat and more-Typing Files

  The cat command types out the contents of a file. This command is very useful for typing out small files or piping the contents of large files to other commands. It is invoked by giving the filename as an argument:

thales% cat intro.tex
This is the contents of the file intro.tex
This is the second line.
This is the third line.
.
.
.
This is the last line.
thales%

There is another command, more, that can also be used to type out the contents of files. There are a few advantages to using more. The more command will stop when the listing fills up the screen, and display ``-More- (x%)'' (x being the percentage of how far you are into the listing). The command will wait for you to press the spacebar before it continues listing the file. It can also ``search'' for specific characters in the file so that you may start and end your listing at any point. To get help on more you can use man, or you can type an h when you see the ``-More-'' prompt at the bottom of the screen.


gopher-General Information Utility
gopher 1. Any of various short tailed, burrowing rodents of the family Geomyidae, of North America having furlined external cheek pouches. Also called pocket gopher. 2. Any of various ground squirrels of the genus Citellus of North American prairies. 3. Any of several burrowing tortoises of the genus Gopherus, especially G. polyphemus of the South East United States. (Probably short for earlier megopher, gopher tortoise, of unknown origin.)

The American Heritage dictionary has omitted other definitions which the RCF would like have added.

tex2html_wrap_inline580 4. One who runs errands, does odd-jobs, fetches or delivers documents for office staff. 5. (computer tech.) Software following a simple protocol for tunneling through a TCP/IP internet.

Gopher is much harder to talk about than to use. If you have no idea what is going on, just type gopher at the system prompt and play with it. The information is there for the taking, it is there to be used. No one is watching you and laughing at your mistakes. So make some! Here is an example of what a typical screen looks like after invoking gopher.

shark10% gopher

                   Internet Gopher Information Client v1.12S

                   Root gopher server: shark10.math.umass.edu

 -->  1.  Math Research Computing Facility/
      2.  Math Department Information/
      3.  Math Department Weekly Calendar/
      4.  Other Campus Resources/


Press ? for Help, q to Quit, u to go up a menu      Page:1/1
In this example, there are four categories of information. You would select one by moving with the arrow keys and pressing return. Notice that gopher offers a help option. After a little searching, we used gopher to read the sports news in USA Today, look up a few phone numbers, and find out how many students are enrolled at UMass.

logout-Logging Out

The command for logging out is simply logout. The system also recognizes bye as being the logout command. Logging out will end your session.

thales%logout

If you have stopped background jobs, the system will not let you logout until you have killed them all off. You can use the jobs command to see any background jobs. Then you must kill them off. The following example shows this situation, and how to resolve it if you are using the C shell.

thales%logout
There are stopped jobs.
thales% jobs

    [1]  + Stopped (signal)     emacs

thales%kill %1

    [1]  Done                   emacs

thales%logout

A few words about Editors

Editors are used to create and edit files. Choosing an editor can be a difficult matter because computer users have very strong preferences towards a their favorite editor. In general, every editor has advantages and disadvantages, and you should choose the editor that best suits your own needs. Many people learn more than one editor so that they can use the best one for the particular task at hand.

The RCF supports several Unix editors, vi and ed, as well as GNU EMACS. vi is a screen-based editor that comes standard on all Unix systems. It is fast, powerful, screen-oriented but has a uniquely confounding command syntax. ed is a line-editor also standard on Unix. It provides very good string matching and high speed operation, but you can only see one line at a time (similar to Xedit on the Cyber). GNU EMACS is a very flexible screen editor. It is a free public-domain editor that can be found on most Unix systems. It powerful, easy to use, and can be customized to your own needs. This is the recommended editor at the RCF. Documentation for all of these editors is available from the RCF.

Printing Information
 


Sending Print Jobs

The various printing utilities have been collected into a script on thales. This script is invoked by typing print at the system prompt. Simply type print , and you will be asked which file you want to print and which printer you want to send it to (a list of available printers will be printer on the screen if you ask). If you know exactly which printer you wish to send you file to, you can use the print command as follows:

thales% print printername filename

This will send the named file to the chosen printer. You should be aware that certain printers have certain uses and restrictions. This information is available on-line (just type ``h'' when the computer asks for a specific printer), but it is included here also. The RCF Printers are listed in the table below.

Printer NameQualitySpeedLocation

mainhighhighrm 1537
depthighhighrm 1630
posthighmediumrm 1422
drafthighmediumrm 1235A
cusahighmediumrm 1115A

Checking The Print Queue

If you are curious to see if your job has been printed, or if you want to know if there is a long line for a particular printer, you can use the lpstat command. You can request different types of printing status information using this command. The table below summarizes some of the more useful options options for lpstat. You can read about more options in the man pages. Some lpstat Options
OptionDescription

-aShow if a printer is accepting jobs
-dShow default destination
-pShow status of all printers
-p printer-nameShow status of specific printer
-u usernameShow requests by username

For example,

thales% lpstat -p main
printer main is idle. enabled since Mon Jul 19 15:55:09 EDT 2002. available.

Canceling A Print Job

You can use the cancel command to cancel a print request while it is still in the queue, or if it is being printed. In order to do this, you need to know the request ID. The request ID always includes the name of the printer, a hyphen, and the number of the print request. For example the request ID of a job sent to the main printer may be main-118696. The request ID is displayed after you submit the job. If you do not remember the number, type lpstat and press return. You may cancel more than one job at a time. The syntax is cancel requestID. For example,

thales% cancel main-118696
request ``main-118696'' canceled
thales%

Books and other references

ELM User Info
by by David Taylor.
This has all the information about elm that you can not get from the on-line help keys.
Using GNU EMACS for the First Time
by Scott F. Conti.
This is a short guide to using GNU EMACS on the shark10. It covers the basics of EMACS and is a supplement to this guide.
The Unix C Shell Field Guide
by G. Anderson and P. Anderson.
A good introduction to using the C-shell (called csh). This book explains the features of the C-shell and has excellent examples of C-shell programming.
The UNIX System
by S.R. Bourne.
A good introduction to the Bourne shell (called sh). This book contains some useful examples of Bourne shell usage and shell programming.
The Unix Programming Environment
by B. Kernighan and R.  Pike.
This is a well written introduction to Unix and the Bourne shell (sh). It provides lots of useful information about writing shell scripts. Some of the examples are difficult to understand unless you already have experience using Unix and the Bourne shell.
The C Programming Language
by B. Kernighan and D. Ritchie.
Also known as ``The C Book'', or simply ``The Book''. This is absolutely the best guide to the C language. If you have any interest in using C or Unix hacking, you should acquire your own copy.
The TeX Book
by D. Knuth
The complete story about TeX.
The LaTeX User's Guide
by L.  Lamport.
The complete story on LaTeX.
The Joy of TeX
by M. d. Spivak
The complete story on -TeX
TeX For The Impatient
by Paul W. Abrahamf
A shorter, less complete, coverage of TeX.
The Emacs info system.
by Free Software Foundation.
The on-line version of the Emacs manual, with all of the text of the hard-copy manual organized into a tree structure to facilitate finding the material you want. There are several different indexes. Type ^hi from inside emacs (that is control-h followed by i) to access this version of the emacs manual.


Return to front