Unix Lab

First Things

Working environment

You are probably working on a Unix workstation in one of the closed labs in our department. You can access these materials from home on any browser although the Unix exercises will have to be done on a computer running Unix. This might be one at home (such as a computer running Linux) or one of our workstations that you can access from home.


You can use any browser to access these documents. In the lab you will probably be using Netscape or Mozilla but at home you can be using any browser such as Internet Explorer on PCs or Safari on Mac OS X systems.

Your lab manual

Each time you work in the Unix lab, you should start with the main Lab directory. It is accessed by following the links at http://www.cs.sjsu.edu. The first time you do this, the lab assistant may have to show you how to get to that document. You should then set a bookmark for that document so that later you can get back to it easily. The lab assistant will show you how to do this, too.

The main Lab directory is just a part of this entire set of documents which is your lab manual. You will select which module you want to work on. You should start from the beginning if you are new to Unix but you may find that you want to go to a particular module to refresh your memory about some particular aspect of Unix. The choice is yours.

You will notice that certain words in the lab manual are highlighted in a different color. As you are probably aware from normal use of the Web, these words are links that will take you to other parts of the manual. For example, try checking out glossary of terms. To get back just press the "back" button on your browser.

A separate window for Unix

At times you will be asked to try certain commands. To do this you will need to have another window open in which you will be working on one of our Unix systems. There are several ways to do this. The easiest is to use a Unix workstation. Keep the browser open in one window and a separate terminal window open in which to execute the text-based unix commands we will examine.

In the closed Unix labs, all the computers are running Unix (the Solaris version supplied by Sun Microsystems). If you are accessing the lab manual from a non-unix machine then you will have to open a window in which you are accessing a Unix machine. For example, if you want to access a Unix machine on campus from home, then you want to have a Unix account for the computers in Washington Square Hall (WSH) (the lab account in the closed labs unfortunately does not get you access to the unix machines in WSH).

The Unix computers in WSH are named: 'cs0x.cs.sjsu.edu' (the 0 is a zero and not the letter O) as the host name. The 'x' stands for any one of the numbers 1 through 9 (example: 'cs03'). You will need to use a utility called 'ssh' to access these computers. Ask your lab instructor for more information if you are interested.

The pointing hand icon will indicate a command that you need to type in the window in which you communicate with Unix:


asks You to type ls after the Unix Prompt (i.e.%).

To move from one window to another, just place the cursor (using the mouse) in the window you want to be in and click with the left button.

Whats's Unix?

Unix is an operating system. It can run on many different kinds of computers and there are several "flavors" of Unix. For example, at home you might be using Linux. This is just another version of Unix.

In the department's labs, you will be connected to one of the Unix workstations running a version of Unix that was developed and is maintained by the company Sun Microsystems. We are currently using Solaris 9.

In this lab, you will learn those commands that should work on any version of Unix that you happen to encounter. When you learn commands that are not available on all versions of Unix, we will try to point that out.

The Unix operating system has been created using the metaphor of layers built up around an innermost piece called the kernel. The kernel is the part of the operating system that touches the hardware. This is where you will find the software that "talks" to disk drives and keyboards as well as handling all the primitive tasks for which an operating system must be responsible.

Above this layer is what is called the shell. The shell acts as the part of the operating system that serves as an intermediary between the user and the kernel. Nearly everything we do in this lab will be to issue commands that will be handled by the shell.

There are several versions of Unix shells that have been written. You will probably hear of the Korn shell, or the Bourne shell (named after persons who were largely responsible for their creation), the BASH shell (on Linux systems), or the C shell (named because of it's focus on C programmer tools). We will be assuming the use of the C shell. In the lab, since this is the default, you will not have to do anything to make that the shell that you are using.

Click here to go to the main lab directory..

These pages were developed by John Avila SJSU CS Dept.