Date of last revision: 9/20/1997

  1. Logging in and logging out
        login       logging into the workstation
        logout      gracefully leaving the workstation

  2. Seven simple and essential UNIX commands
        date        find the current date
        helpme      access information specific to the SCU Design Center
        xhelpme     a very user-friendly X-Window version of helpme
        man         access UNIX online manual pages
        lrom        access all of HP's documentation for these workstations
        who         who is logged on to "this" system 
        whoami      what is the username of who is using this terminal

  3. Basic UNIX file and directory commands
        pwd         find out what working directory you are at
        ls          obtain a listing or your files
        cp          copy a files or bunch of files
        rm          remove and completely and absolutely kill a file
        mv          move a file from one place to another
        more        display the contents of a file

  4. Printing Commands

  5. Editting and compiling programs
        dtpad      the CDE text editor
        vi          the 'standard' UNIX editor
        emacs       a more advanced text editor

  6. Sending and receiving email

Logging in and logging out

When you first encounter your workstation, it is sitting there patiently, waiting for you to log in. Special accounts should have been set up for each of you so that you can these workstations for your courses.

To access your account you have a Username and Password.

For most users, the Username consists of the first initial of their first name followed by their last name with no SPACE in between. The following are some examples:

     Name			Username
     ----			--------
     Jane Line			jline
     Sally Robinowitz		srobinow    
     James Beanstalk    	jbeansta
     Sammy A. Jones		sjones1
     Sammy B. Jones		sjones2

Note that users with long last names only include the first seven letters in their Username for a total of 8 characters. Also, when many users have a name that starts with the same initial and exactly the same last name, their Username gets a unique digit appended to it. If you have any trouble logging into the system, please see the Lab Monitor on duty.

In order to use the workstations, you will also have a Password. When you login to the system for the first time, your password will be your social security number without any dashes. You are advised to change your password as soon as possible.

Here is an example dialogue:

login: mline [return] password: XXXXXXX [return]

The characters for your password will not appear as you type them.


If you have successfully logged in, you will get a message like the following:
   #                                                                      #
   #           WELCOME to the HP Engineering Design Center of             #
   #                     Santa Clara University                           #
   #      ( Brought to you by Estrugo, Lynch, Marquardt, and Welch )      #
   #                                                                      #

If you have not successfully logged in, you will get a message similar to the following:

Login incorrect

If you get this message, you may have mistyped your user name or password. Just try again.


It is always useful to know how to get out of something. To sign off (LOGOUT, LOGOFF) the workstation, click on the right most icon labelled 'EXIT' on the dash board at the bottom of the screen. After doing this be sure to click on the 'OK' button when the computer double checks if you really want to logout.

If you are logged in remotely or through a character device such as a terminal, or from home through a modem, you can type 'exit' at the prompt or press the [ctrl] key and the 'd' key simultaneously. This will log you off the system.

Seven simple and essential UNIX commands

UNIX is a powerful operating system that can do many things for the user, programmer, and/or system administrator. This section is designed to give you just a taste of some UNIX commands.

After you have successfully logged on, you will see the UNIX system prompt:


This UNIX system prompt tells you that the system is ready for commands. Let's try one!

date - find the current date


date [return]

The system should display the current time and date.

What happens if you make a typing mistake? Try the following:

dste [return]

You should get the following message:

dste: not found

There are two simple ways of correcting typing mistakes on the command line. The easiest way is to use the [back space] key to erase the mistyped characters. (Do not use the cursor or arrow keys!!!!) Try this:

ds [back space] ate [return]

The second way to fix a mistyped command is to use the "line kill character," or [ctrl] X. (remember to hold them simultaneously). Try this:

dste [ctrl] X date [return]

[Ctrl] X tells UNIX to ignore anything typed proceeding it.

helpme - access information specific to the SCU Design Center


helpme [return]

Helpme is the character based version of an application designed to answer all your questions about the SCU Design Center. This is especially important when you wish to use an application such as Autocad or Ideas. Helpme will tell you what steps you need to take in order to correctly use the application. Helpme also has information on all the applications, languages, tools, and other software available on the system.

Helpme is also available in other formats:

xhelpme - a very user-friendly X-Window version of helpme


xhelpme [return]

Xhelpme is a very user-friendly version of helpme. You do not need to type any commands at all. Xhelpme pops up on your screen every time you log in to the system. Please do not simply close it every time you see it. Take the time to use it (it is very easy) and you will make your life in the Design Center much easier.

For more information on helpme and xhelpme, please look in the help menus of xhelpme. In fact, for more information on anything regarding the SCU Design Center, please consult xhelpme.

man - access UNIX online manual pages


man [return]

Another important documentation command is 'man'. With the 'man' command, you are never but a few keystrokes away from documentation. The UNIX programmer's manual is on-line! If you would like to find out about a particular UNIX command, all you have to do is type 'man' followed by the command you want to know about.

Let's try an example:

man date [return]

After a momentary pause, you will see the manual pages for the 'date' command on your screen. To see the next page, press the [space bar]. After you have paged through the documentation on the 'date' command, try the 'who' command.

lrom - access all of HP's documentation for these workstations


lrom [return]

Another important documentation command is 'lrom'. This command allows you access to all the documentation on the HP workstations. This goes beyond the 'man' command. If you want to read about how a command or product works, just type:

lrom [return]

A menu is shown on the top of the screen. Select 'help' by moving the mouse pointer to the 'Help' menu and selecting one of the options. Read about the browse command. This is the command that allows you to read any chapter in any book in the online documentation library.

who - who is logged on to "this" system


who [return]

The who command tells you who is logged on to the current workstation you are using.

whoami - what is the username of who is using this terminal


whoami [return]

This command tells you who is the invoking user, who are you. If you ever forget who you are, this can be a useful command.

Basic UNIX file and directory commands


The UNIX system has three types of files: directories, files and special files (we will ignore special files for now). A file is a place where you can put data: programs, input data, saved electronic mail messages, etc. Each file should have a unique name. Any character can be part of a filename, but there are some you should avoid (they mean special things to UNIX and can mess things up for you in a big way!).

GOOD filenames:

	source			(less than 14 characters) 
	assign1.p		(the period is OK in your filename) 
	message4liz		(digits are OK too) 
	save.tmp		(you can put the period anywhere) 
	gosh_golly		(the underscore character is OK too)

BAD filenames:

	>fivelines<		(don't use the > or the <)
	Words?			(don't use the ?)
	*junk			(don't use the *)
	4|5words		(don't use the |)

Your best bet is to stick with letters, digits, the underscore (_) and the period (.). There are some file naming conventions that are usually associated with programming languages.

A 'convention' means that everyone agrees to do something a certain way to make it easier to understand. You don't HAVE to do it that way, but the person who is trying to decipher your work will appreciate the fact that you adhered to conversions!


	filename.c		(a program in the C language) 
	filename.f		(a program in the FORTRAN language) 
	filename.p		(a program in... you guessed it! PASCAL)

THIS IS VERY IMPORTANT! Don't forget that Pascal program source code files must end with a '.p' and that FORTRAN program source code files must end with a '.f ' otherwise you will have problems with the compilers.

You should also know a bit about directories. A directory is a thing that contains information about other files and directories. A useful analogy is to think of a directory as a filing cabinet. The cabinet itself is the UNIX file system. Each drawer represents a directory (which has a label just like a filing cabinet drawer). Inside each drawer there may be file folders that further subdivide the file system. The file folders are the "subdirectories" of the drawer where they are located. Subdirectories have their own label too. Finally, there are the actual files themselves. They have their own names too.

Every user on a UNIX system has his/her own 'home' directory. This is where all your files will go unless you specify for them to go elsewhere or you change to another directory.

pwd - find out what working directory you are at


pwd [return]

The 'pwd' command stands for "Print Working Directory". This is an important UNIX command because it will help you figure out what directory you are currently working on.

To find out what your home directory is, issue the 'pwd' command as soon as you login. When you login, you will always start working on your home directory. You may move to other directories as you go about your work. Sometimes, it is easy to get lost in the many directories that exist in the system. You can use the 'pwd' command to find out where you are at any time.

ls - obtain a listing or your files


ls [return]

The 'ls' command stands for 'list'. This is probably the most common UNIX command. Use 'ls' to get a listing of your files, try this (note it is a little L not a one!)

The 'ls' command also has some options associated with it. The following option displays a longer listing of your files, with more information about when the file was created, who created it, etc.

Try this:

ls -l [return]

Don't worry about trying to interpret all of the information that is displayed in this long directory listing. The important point is that nearly every UNIX command has options associated with it. Options for UNIX commands are almost always indicated like this:

examplecommand -a -b -c

In this example 'a' 'b' and 'c' are options to the command.

cp - copy a files or bunch of files


cp source_file dest_file [return]

The 'cp' command allows you to make a copy of a files. For example, you can copy the message of the day that appears every time log into the system to your home directory:


cp /etc/motd message [return]
ls [return]

You should see the file 'message' in your directory.

The source_file is the file you wish to copy, and the dest_file is the name that you want the new file to have.

Continuing at the keyboard, let's make a copy of the file again:

cp message message2 [return]

Check to make sure it worked:

ls [return]

rm - remove and completely and absolutely kill a file


rm filename [return]

The 'rm' command can be used to delete a file. Please note that once that a file is removed, it is gone forever.

For example:

rm message2 [return]

After executing the above command, the 'message2' file should be gone. Do a directory listing to make sure that it is gone:

ls [return]

mv - move a file from one place to another


mv source_file dest_file [return]

You can use the 'mv' command to move one file to another. Sometimes, this operation is reffered to as rename. Renaming a file effectively changes the file name.


mv message mymessage [return]

The first name is the file you wish to rename, and the second name is the NEW NAME for the file. Check to make sure the renaming really happened:

ls [return]

more - display the contents of a file


more filename [return]

The 'more' command will let you view the contents of a file.


more mymessage [return]

If you executed the 'cp' command previously mentioned, the above 'more' command should display the message of the day that you copied from the system.

Printing Commands

The following is a very basic introduction to printing. The SCU Design Center has a many printing resources. Please see the helpme file on printing to get familiar with our printing facilities. To do this, you can type the following command at a prompt:

xhelpme printing-unix [return]

There two dot matrix printers available for general student use, such as printing 'C', 'Pascal', and 'Fortran' source code. The names of these printers are dm1 and dm2.

To print a file called 'mymessage', you would execute the following command:

lp -d dm1 mymessage [return]

- or -

lp -q dm2 mymessage [return]

Note that the first command prints to the print queue called 'dm1' and the second to the print queue called 'dm2'. The '-d' flag to lp tells the spooler what print queue you want to print to. Please consult "helpme printing-queues" for more info.

Editting and compiling programs

There are three main editors available in the SCU Design Center. These are:


The editor of choice for most people will probably be 'dtpad'. Dtpad is part of the Common Desktop Environment. It allows you to use pulldown menus and other user-friendly features to retrieve, edit, and save text files.

Invoking 'vuepad' type:

vuepad [return]

The 'standard' UNIX editor is 'vi'. Vi can be hard to use for the beginning UNIX user, but it available on many plataforms so it is widely used. 'vi' stands for "Virtual Impossibility".

To invoke 'vi' type:

vi filename [return]

A more advanced editor is 'emacs'. Emacs has many features that make it attractive expecially to programmers and people involved with software development. Emacs also has menus, but they are not as good as the ones in 'vuepad'. A very nice feature that emacs has is that all of its documentation is online.

To invoke 'emacs' type:

emacs filename [return]

After you have successfully created and saved the source code for a 'C', 'Pascal', or 'Fortran' source file, you can compile it.

For example, say you created a Pascal file called myprog.p and you want to compile it, you can use the following command:

pc myprog.p [return]

This invokes the Pascal compiler, telling it to compile the file called 'myprog.p'. If you have typed in your program without any errors, this program should compile without errors.

If you have errors, you can find a line numbered version of your file with errors listed below in the file 'ERROR.OUT'. To obtain a printed copy of this file for error correcting analysis type:

lp -d dm1 error.out

After figuring out your error, you must go back into your editor and fix the file 'myprog.p'. After you have fixed them, then you must attempt to compile the program again. When finally you have no errors, type this to run your first program:

pc myprog.p -o myprog [return]

Compiling 'C' and fortran programs is very similar.

cc myprog.c -o myprog

f77 myprog.f -o myprog

Sending and Receiving Electronic Mail (email)

You can use your account in the Design Center to send Electronic Mail to other users. In order to do this, you first need to know the Username of the person you wish to correspond to. For example, say the name of your friend was 'bjones' and you wanted to send them a file called 'myfile', you could execute the following command:

bjones < myfile [return]

Alternatively, you can use an interactive mail program called 'elm'. Elm has many features and is very easy to use. Please consult the helpme files on 'elm' and 'email' for more information. You could accomplish this with the following commands:

xhelpme email

xhelpme elm

    | 									  |
    | 									  |
    | 									  |
    | 									  |
    |									  |
    |									  |
    |									  |
    | 									  |
    | 									  |

Click here to return to the Helpme menu.