Workbook for SLD Offline Users - Getting Started in UNIX

UNIX at SLAC runs on a number of workstations connected by a local area network and logically organized into two main clusters: "Cad UNIX", for those machines dedicated to running SLAC's Computer-Aided Design system; and "Central UNIX", for all the rest. Most of the workstations are IBM RS/6000s, running AIX (IBM's flavor of UNIX), but there are also Sun SPARCstations (running SunOS), NeXTs (running NeXTstep), and a smattering of other machine architectures and UNIX flavors. Many of the machines are located in the computing center (CGB or Building 50) but quite a few are scattered around the site on desktops, as well. Nearly all are centrally managed by SCS, which provides such services as a network-wide user account registry, file servers, home and group directory space, name servers, etc.

What follows assumes a rudimentary understanding of some basic UNIX concepts and terminology. If you are new to UNIX, you may want to acquire a book to help you get started. Check this Concise Guide to UNIX Books for suggestions, or ask a UNIX-savvy colleague for a recommendation. If you are new to UNIX at SLAC, you should also glance through some of the information in SCS's Introduction to UNIX at SLAC.

The UNIX operating system is case sensitive. In the following examples, UNIX commands are written like this and must be typed exactly as written.

Get an Account

If you do not already have an account on the Central UNIX cluster, your first step is to get one.

SCS will give you a home directory named /u/ey/<user>, where <user> is your username, on one of the file servers. (At present, home directories are set up on an NFS server, but in the near future the default will probably change to AFS.)

Login

You can login to your Central UNIX account from an x terminal, a desktop UNIX workstation, or from a Mac or PC running x terminal software (you can also login from a dumb terminal, but this is not recommended).

Check your login shell

The way in which your UNIX environment gets initialized when you login depends on your login shell". At SLAC, the default login shell is now tcsh which is also the recommended shell for SLD users. In the recent past, however, SLAC's default login shell was csh, which provides a subset of the facilities available in tcsh. The SLD environment should be compatible with either of these shells, but if you switch to one of the other UNIX shells, you're on your own.

To check which shell you're currently running type

   ljm$hebe $ echo $SHELL

If the result is something like

   /bin/csh
or
   /bin/tcsh
or
   /usr/local/bin/tcsh
you're running an SLD-compatible shell; nevertheless, if you're running csh we recommend that you swicht to its more user-friendly cousin, tcsh.

Setup the SLD UNIX Environment

Every time a csh or tcsh shell begins, it executes a script named .cshrc in your home directory; then, if the shell is a login shell, it also executes the script named .login, also in your home directory.

The "sample" scripts are also inteneded as repositories of useful enhancements for your UNIX environment. You may want to refer to them from time to time to review any new suggestions.

Once you've modified your .cshrc and .login scripts the SLD environment should be properly setup the next time you login. If you'd like to set it up immediately, without logging off, you must source (not simply execute) these scripts:

   ljm@hebe $ cd $HOME
   ljm@hebe $ source .cshrc
   ljm@hebe $ source .login

To check that the SLD environment has, indeed, been setup, enter the command

   ljm@hebe $ echo $SLDROOT

The result should be something like

   /afs/slac.stanford.edu/g/sld

Change your password

If this is the first time you have logged in to your new UNIX account you should change your password. It is particularly important to choose a good password in UNIX, which is a very open environment and thus tends to attract many attacks on its security.

Once you've selected a good string to use as a password, enter the yppasswd command (not the passwd command) and respond to the prompts as shown below (some local UNIX gurus claim that it is safer to do this while logged in to a Sun host, such as unixhub, rather than an RS/6000):

   ljm@unixhub $ yppasswd ljm
   Changing NIS password for ljm on afsdb1.
   Old password:
   New password:
   Retype new password:
   NIS entry changed on afsdb1

Note that your old and new passwords will not appear on the screen.

Password changes may take up to six hours to go into effect, so don't forget your old one until you've successfully used the new one to login.

Change your login shell to tcsh

The tcsh shell program offers a number of advantages over csh. One of the most important for users familiar with VMS is a similar command line editing facility. To make tcsh your login shell, enter the ypchsh command (only available on Sun hosts) and respond to the prompts as follows:

   ljm@unixhub $ ypchsh ljm
   Changing NIS login shell for ljm on afsdb1.
   Old shell: /bin/csh
   New shell: /usr/local/bin/tcsh
   Password:
   NIS entry changed on afsdb1

You must also make a change in your .cshrc script. Using an editor, locate the line that looks like

   eval `/usr/local/bin/environ /bin/csh ...`
and change the /bin/csh/ to /usr/local/bin/tcsh/.

As with passwords, changes to your login shell may take up to six hours to go into effect.

The UNIX staging system

A staging system is available to simplify access to large Unix data files. A set of utilities are provided to copy such files from disk to tape and back again.

A writeup on this Unix Staging System has been adapted from Charlie Young's E143 documentation.

Temporary Disk Space for Data Files

The /nfs/ravel/u1 filesystem has been set aside to provide a temporary home for data files, like ntuples, prior to copying them off to tape via the UNIX staging system.

The usage policy is for people to create a directory on the disk with the same name as their account.

These files can be copied directly from VMS via NFS, using the NFS addresses for the SLACVX user and scratch disks of /nfs/slacvx/sld_usr0/ and /nfs/slacvx/sld_tmp0/scratch/, followed by your own directories.

This disk is cleaned every morning, erasing files older than 5 days. The erasure policy is written up in a README file on the disk.


Len Moss
19 May 1995