NRBSC Online Training: Digital Unix

This exercise is designed to introduce you to the Digital Unix operating system. This exercise is not a complete step-by-step example, you will have to think about the problem and what you are trying to acomplish before moving on to the next step. Please read the entire step before typing in anything on the computer. Also please make a printout of this web page and fill in the blank lines. Your responses will often be referred to in later steps.

Log in to Digital Unix

  1. Log into the Digital Unix system. Remember that the Digital Unix system is case sensitive. At the login: prompt enter your login ID. (This is on the separate sheet handed out to you.)
  2. At the password: prompt enter your password. (This is either the initial password supplied on the separate sheet handed out to you, or if you already changed your initial password, the new password.)

Directory Navigation

  1. Show your current working directory (this is your $HOME directory.) Issue the command pwd. Write your $HOME directory below:
  2. Create a subdirectory called UNIX. Enter mkdir UNIX
  3. To see that your directory has been created type in ls -CF. Note that the -C option lists information by column and the -F option appends a "/" after the directory name.
  4. Change your working directory to the UNIX subdirectory. Issue the command: cd UNIX
  5. Show your current working directory. Issue the command pwd. Write the directory name below.
    Note the difference between the name above and the name in step 2.1.

Using the ls command, cp command, mv command, rm command,
and cat/more commands.

  1. Issue the command: cp /biomed/db/genbank/gbrel.txt gbrel.txt
    This command will copy the document into your current directory.
  2. Issue the ls command, to list the files in your current directory. You will see that this file exists in your directory. Now try some of the ls command options. Type ls -l. Next type ls -lF. Then type in ls -laF.
  3. Browse through this document (you do not have to read it). Type in cat gbrel.txt. Next try using the more command. Enter more gbrel.txt. Then to quit the more command enter either q or Ctrl-c (Remember that the space key will show you the next screen of text.)
  4. Enter mv gbrel.txt genbankrelease.txt. Now type ls and note that the filename has changed, but the files contents have not.
  5. Now remove the file with the command rm genbankrelease.txt to clean up your directory. Again use the ls command to confirm that the file has been deleted from your directory.
  6. Issue the command: cp /biomed/lib/example/.login $HOME/.login
    This command will copy the file that will be edited in step 5.

Using MAN

  1. Issue the man -k edits command to find some of the UNIX editors available.
  2. Next issue man vi to find out information about the vi editor. You can quit the man command by entering either q or Ctrl- c (Remember that the space bar will show you the next screen of text.)

Using VI
The Unix editor vi is a dual mode editor. This means , that unlike a word processor on a personal computer, the vi editor has a mode for inserting text and a separate mode for executing commands that remove, change, or otherwise operate on the text that was entered in the insertion mode. When you initially begin a session in the vi editor you are automatically in command mode.

  1. vi can be used to edit an existing file or to create a new file. In this case,we will be editing the .login file that we copied in step 3.6. Enter vi $HOME/.login
  2. The screen should look similar to the text below. Notice that the lines indicated in bold are missing from your file. You are to add these lines in this exercise. You will also have to remove the two # symbols.
    setenv CLASSPATH /biomed/src/SeqSpace/SeqSpace.jar
    set prompt="`hostname`> "
    set path=(. $path /usr/sbin /usr/ucb /usr/psc/bin \
    /usr/psc/gnu/bin /usr/local/bin /usr/bin/X11 \
    set XGOBID=/biomed/src/XGobi/xgobi/
    tty -s
    if ($status == 0) then
    stty intr '^C'
    set history = 30
    stty dec
    tset -I -Q
    source /biomed/bin/gcg
    source /biomed/bin/emboss
  3. Position the cursor over the first # symbol. Remember you can move the cursor to the left using the LeftArrow or the letter h, to the right using the RightArrow or the letter l, up using the UpArrow or the letter k, and down using the DownArrow or the letter j).
  4. Enter x to delete the # character.
  5. Position the cursor over the second # symbol.
  6. Enter x to delete the second # character.
  7. Position the cursor over the first s on the set XGOBID=/biomed/src/XGobi/xgobi/ line.
  8. Enter i to place the editor into insertion mode at the cursor position.
  9. Enter /biomed/bin) followed by the Enter key.
  10. Enter Esc (or Ctrl [ ) to leave the insertion mode and enter the command mode.
  11. Position the cursor anywhere on the endif line.
  12. Enter o to place the editor into insertion mode on the line after the cursor line.
  13. Enter source /biomed/bin/gcg followed by the Enter key.
  14. Enter source /biomed/bin/emboss followed by the Enter key.
  15. Enter Esc (or Ctrl [ ) to leave the insertion mode and enter the command mode.
  16. Enter :wq to write the changes and leave the editor.
  17. # Execute your .login file. Enter: source $HOME/.login. If there are errors, now is the time to correct them. A common error message is too many parentheses, ')'. The cause of this error is usually either a.) the space character after the continuation character (\) in lines two and three or b.) Lack of spaces around the double equals sign at line 6. To correct an error:
    1. Enter vi $HOME/.login
    2. Make sure that you typed in exactly what was listed in step 5.2. If you spot a mistake, move the cursor directly over the mistake.
    3. Enter x to delete the mistake.
    4. Enter i and fix the mistake. When you are done typing enter: Esc (or Ctrl [ )
    5. If there are more mistakes, Repeat steps 5.16.2 - 5.16.5.
    6. Enter :wq
    7. Repeat step 5.16


  1. To log off the system when you are done issue the command logout (or Ctrl+d).

Search NRBSC

NRBSC Gateways

Microphysiology Gateway image.

Volumetric Data and Viz Gateway Analysis.

Quantum Mechanics/Molecular Mechanics Simulation Gateway.

NRBSC projects are made possible by these sponsors:

NIH logo. Pittsburgh Supercomputing Center logo. NCRR logo.