Table of Contents Previous Chapter

CHAPTER 2 Beginning UNIX

This section shows you how to login to SLAC's central UNIX system, begin and end a work session, inform the computer of the type of terminal you are using, change your password, and get help when you need it.

SLAC currently supports UNIX on two major architectures: SUNs and RS/6000s. In addition to SLAC's central UNIX system, some SLAC users use the Reason cluster of NeXTs, whose file system and available applications are somewhat different from the central UNIX system. If you are a NeXT user of the Reason cluster, you might want to read the document Using Your NeXT at SLAC by Paul Kunz. It is available online as file /LocalLibrary/Documentation/Welcome.frame if you are connected to the Reason Cluster, or as file /nfs/ebnextk/LocalLibrary/Documentation/Welcome.frame if you are connected to the central UNIX system.

UNIX Overview

Your UNIX Account

Normally people share a UNIX computer system. Each user must have a UNIX account, which provides a necessary means of regulating use of the system. An account includes a username and password. The username is the way you identify yourself to the system; the password verifies your identity. Accounts must be opened by filling out a SLAC Computer Account Form available at the Help Desk in the Computer Building Lobby. (Since the form is also available on the Web at URL http://www.slac.stanford.edu/comp/form/account/account.html, someone with access to the file can print you a copy).

Your UNIX account provides access to all SLAC UNIX machines; that is, the account allows you to log in and access your files from other UNIX machines on our network.

Making the Connection

First you must do whatever is necessary to get a "login prompt" from a UNIX host. You could, for example, walk up to a workstation that has "login:" as the last line on its display. It's not always that easy. Each of the following affect how you connect to UNIX and how you use it:

There are too many ways to connect to our system to describe them all here. The best source of advice, if you need it, may be someone in your group who uses similar equipment. See also connecting from home or offsite. If these resources don't answer your questions, try the SCS Help Desk at 415-926-4357.

Clearly not all users will have the same system capabilities. However, most of the important UNIX functions can be performed independent of connection and equipment using standard command conventions.

Prompts

When the computer is ready to listen to your directions, it displays a prompt. This prompt varies depending on what system you are using. For SLAC, the default prompt is $. (Default, in computer terminology, is the action that the computer takes when you do not direct it to do otherwise.)

Commands

Commands are directions given to the computer by the user. Many command names are abbreviations for English words. To give the computer a command, you type the command name and press RETURN. An example of this was shown in "About This Document" on page 2.

Arguments and Options

Most UNIX commands allow you to attach one or more arguments. Arguments determine the way in which the command carries out its function. Some types of arguments are names of computer files or time limits. For example, the command ls tells the computer to list the names of files in your current working directory. To find out whether the file name mbox is in your current working directory, you would type the argument mbox after the command ls:

-------
ls mbox  
         
-------
You would then press RETURN to enter the command ls and its argument mbox into the computer. If the file mbox exists, its name would be listed on the screen.

An option is an argument included on the same line as the command and preceded by a hyphen (-). It tells the computer to execute a particular variation of the command. For example, ls -l (that is, the letter l) tells the computer to list the file names with additional information about each file. Options are sometimes called flags.

Special Keys and Control Sequences

There are several special key and control sequences that are helpful when you use UNIX. When you type a control sequence, you hold down the CTRL key while you type a certain letter. To type ^c, for example, you would hold down the CTRL key while you type c.

Consult the following chart when:

WARNING!! UNIX is case sensitive. Case sensitive means that UNIX differentiates between uppercase and lowercase letters. For example, Open is not the same as open or OPEN. Pay special attention to case when you use UNIX.

Logging In

Using a Terminal, Mac, PC, or X Terminal

You first must establish a connection through the Micom switch, a dial-in terminal server, or a software interface to one of the local UNIX hosts via an Ethernet TCP/IP line.

The following illustrates the procedure for establishing a dial-in connection to vesta03, one of our UNIX interactive hosts. Once the login prompt has been obtained, login can continue as shown in "Using a Workstation" on page 8:

Unauthorized access is strictly prohibited!

SLAC Terminal Server

To connect to a host, type:

telnet hostname (or just hostname)

switch to connect to the Micom switch (until September 1997)

Logoff and drop the phone connection:

logout

Escape to Terminal Server's xremote1> prompt:

ctrl-^,x (ctrl-shift-6 followed by `x')

Notes:

(1) This service is restricted to connecting to SLAC hosts only. To reach other machines, first login to a SLAC host and telnet from there.

(2) The Micom switch service is scheduled to end September 1997.

(3) Xremote support is frozen.

xremote1> vesta

Translating "VESTA03"...domain server (134.79.16.9) [OK]

Trying VESTA03.SLAC.STANFORD.EDU (134.79.17.13)... Open

telnet (vesta03)

WARNING: Unauthorized access to this computer system is prohibited.

Violators are subject to criminal and civil penalties.

All activities may be monitored and recorded and these records

provided to law enforcement officials; by using this

system you expressly consent to such monitoring.

login:

Using a Workstation

If you are using a UNIX workstation, the preceding connection sequence is not needed. Whether using a terminal or a workstation, logging in identifies you to the computer. Before you begin a work session, use your UNIX account to log in to the computer or workstation to be used.

Passwords are not displayed on the screen. This is just added protection provided by the UNIX system so that curious eyes behind you cannot read your password. By providing your username and password, you have completed the log in.

If you make a mistake, type your login name and password again. Once you successfully log in, the system displays its prompt and waits for your commands

------------------------------------------------------------------------------------------------
login: meb                                                           Enter userid and press CR    
Enter password for meb:                                              Enter password and press CR  
User meb kerberos-authenticated via AFS 3.2.                                                      
IBM AIX Version 3.2                                                  These messages will vary.    
                                                                                                  
WARNING: Unauthorized access to this computer system is prohibited.                               
Violators are subject to criminal and civil penalties.                                            
                                                                                                  
Last unsuccessful login: Mon Aug 16 12:40:04 PDT 1993 on pts/55                                   
Last login: Wed Sep  1 12:16:10 PDT 1993 on pts/26                                                
meb@ganymede $                                                       Normal command prompt        
------------------------------------------------------------------------------------------------

Workstations and Window Systems

If you use a workstation, you will probably want to start a window system on your machine as soon as you log in. A window system is a software package that makes it easy for you to take full advantage of the graphics and windowing capabilities of a workstation (such as multiple active sessions, high-resolution fonts and graphics).

Several window systems are available for each type of workstation. The most popular is X Windows, some variant of which is available for every workstation at SLAC. There are others, however, and your particular needs may require a different window system. Again, the best advice may come from someone in your group.

Setting Your Terminal Type

Your terminal type tells the computer how to format output for your display and how to interpret keyboard entries. This is especially necessary for the keyboard and display interaction used by text editing programs. Even if you are using a workstation, it is a good idea to tell the computer what kind of terminal emulation to use.

Each time you begin a new computer session, you should set the terminal type. To make setting the terminal occur automatically at the beginning of every work session, follow procedures detailed in "Customizing the Session: Defining the Shell Environment" on page 30.

At SLAC, chances are that vt100 is the terminal type to specify. There are exceptions, so if you are not sure what kind of terminal you are using, ask your computer support coordinator or the Help Desk at 415-926-4357. To set your terminal type, use the command set with the arguments term=terminal type.

-----------------------------------------------------------
$ set term=vt100  Type set term=terminal type RETURN.        
$                 In this example, the terminal is a vt100.  
-----------------------------------------------------------

Changing Your Password

Please change the password that is assigned to you when you open your UNIX account. Although you will not be required to change your password periodically, as users are on the VM system, it is a good idea to change it, perhaps, every six months to preserve the security of your account. The procedure for changing the password varies depending on the machine architecture, but it is consistent for our supported UNIX machines.

In changing your password, the new password should not be any word found in the English dictionary, your username, or any permutation of your name or initials. Helpful do's and don'ts and ways of constructing passwords are given in the file /usr/local/doc/policies/password. Printing of files is described section "Printing" on page 43.

Changing Your Password on Any SLAC UNIX System

To change your password, login to any UNIX host. Then use the command password.

---------------------------------------------------------------------
$ login unixhub              Login to the UNIX host unixhub, RETURN.   
$    password                Command to change your password, RETURN.  
Changing password for ilse.                                            
Old password:                Type your old password, RETURN.           
New password:                Type your new password, RETURN.           
Retype new password:         Type your new password again, RETURN.     
---------------------------------------------------------------------
The password command changes your UNIX login password as well as your AFS password. If you do not have an AFS account, the password command creates one for you and sets the password to your UNIX login password. Remember that, while changes to your AFS password are immediate, changes to your UNIX login password do not go into effect for up to one hour.

Logging Out

Logging out ends your work session on the computer. Finish each work session by logging out to ensure that no one else can continue working on the computer using your account. If a message on the screen indicates there are stopped jobs, be sure to kill them before logging out. (See "The Shell Program" on page 29.)

------------------------------------
$ logout  Type logout, press RETURN.    
------------------------------------

Getting Information

The UNIX Manual

On traditional UNIX systems, the UNIX reference manual is online (that is, in the computer) and is commonly referred to as man pages. The manual contains descriptions of the UNIX commands, so you can refer to them on your screen as needed. Unfortunately, you may have to look around to find just what you are looking for. Since the online manual is organized by command, as a novice you may find it hard to know which command you need to read about. The man and apropos commands can help you. As shown in Figure 1 below, you can use the -k option for man to obtain a list of topics related to a particular key word.

Finding Shell Documentation

Most UNIX commands run programs; you can find documentation for almost all of these commands with the man command. However, some commands are built into the shell program; you can find documentation for these commands with man tcsh (or whatever shell you use). For more information about the shell program, see "The Shell Program" on page 29.

Directory /usr/local/doc

This directory contains documentation, produced at SLAC and elsewhere. You might want to browse through this directory when you are looking for information on a particular topic.

UNIX Journal Club

The UNIX Journal Club initially met in September 1990. When announced, the stated purpose of the Club was "to share UNIX experience at SLAC and to be a self-teaching society on UNIX issues...The club is not intended to be a UNIX committee meeting nor the equivalent of the CCG or VCG."

The Club originally met once a month but no longer meets regularly. Announcements of upcoming meetings are physically posted around SLAC and electronically in the Netnews group slac.users.unix (see "NetNews" on page 54) and in VM News announcements. Handouts and lecture notes of past UNIX Journal Club meetings are available at the Help Desk in the Computer Building Lobby.

World Wide Web (WWW)

The Web is a network-based information retrieval system initially developed at CERN. It makes a vast array of information from around the world available to you by using a single easy-to-use interface. Better still, you don't need to know how or where the information is actually stored to access it; the Web's software takes care of that. In fact you don't even need to know that the information exists at all. The Web makes it easy to browse available information and discover new sources of information.

To access the Web you use a program called a browser. Browsers are available for all UNIX platforms (as well as non-UNIX platforms). The Web presents information in the form of hypertext, which are small documents that contain links to related documents. It is particularly suitable for High Energy Physics, where rapid sharing of up-to-date information among widely spread collaborations is essential.

At SLAC most of the SPIRES databases, such as the HEP publications database, BINLIST, HEPNAMES (email addresses of physicists worldwide), SLAC seminars and many more are accessible. Information on specific experiments is also available, including SLD and BES. In addition, many departments, including Slac Computing Services, now provide much of their documentation, news, and other communications on Web pages. We suggest that you learn how to access information on the Web as soon as you can.

To access the Web on a UNIX workstation or X-terminal, enter the command netscape & after you have started X-windows. From an ASCII terminal or a terminal window, enter the command lynx to invoke a character-mode Web browser. Lynx will provide usable access to most of the important documents on SLAC's Web pages.

For questions and suggestions about the Web, contact the WWW Support Coordinator (WSC) for your group or Division.

Resources for Answering UNIX Questions

Resources at your disposal for answering UNIX questions include the Help Desk, the online AID facility, and the online man pages.

The locally written aid command lets you search for online information and/or pointers to information about UNIX or SLAC in general. To use the command, type aid keyword ... keyword.

$ aid unix

Matching `unix'

-> Suggestions from /usr/local/lib/aid/unix:

See /usr/local/doc/FAQ/unix/intro for beginner's questions about UNIX.

Try the /usr/local/doc/intro directory.

BSD - Berkeley Software Distribution (UC Berkeley's version of UNIX).

> BSD UNIX is the basis for Sun's and NeXT's versions of UNIX.

> (Although Sun is moving toward System V UNIX.)

Print SLAC Computer Account form from the Web; its URL is http://www.slac.stanford.edu/comp/form/account/account.html.

See /usr/local/doc/usc-names for list of UNIX Support Coordinators.

See /usr/local/doc/usc-job for a description of USC duties.

See /usr/local/doc/xcg for information about the XCG.

`xCG' stands for `experimental UNIX Group.'

`/usr/man' contains online version of the UNIX reference manual.

$

You can contact the Help Desk at 415-926-HELP (4357) for questions that neither the aid command nor the man pages can answer.

_____________________________________________________________________________________________

Entering "man -k <word>" produces lines from the various man pages that contain <word> in their NAME-descriptor lines. ("apropos <word>" produces the same output.)
$ man -k password
password (1) - change Unix/NIS and AFS passwords
passwd, chfn, chsh (1) - change local or NIS password information
yppasswd (1) - change your network password in the NIS database
[Several additional lines were produced. These, with "(1)," are commands, which are documented in section 1 of the UNIX manual.]
$ man password
PASSWORD(1) USER COMMANDS PASSWORD(1)
NAME
password - change Unix/NIS and AFS passwords
SYNOPSIS
password [ -f | -s ] [ username ]
DESCRIPTION
password changes the Unix/NIS and AFS passwords. A prompt is issued for the old password and, if it is correct, two prompts are issued for the new password. If the new password is 6- to 8-characters long and both responses match the Unix password in the Network Information Service (NIS) database is changed. The local operating system may impose additional constraints on the new Unix/NIS password format (e.g., minimum number of different characters).
.
.
.
SEE ALSO
afsacct, kpasswd, passwd, ypfiles, yppasswd, yppasswdd
.
.
.
[man pages contain several sections on what the command does, how to enter it with its various options, and even bugs. A very useful section is "SEE ALSO"; if you can't think of a command's name, often the man page of a related command will give you the reminder.]
________________________________________________________________________
Figure 1. Sample man Output

 
Table of Contents Next Chapter