The purpose of this lesson is to quickly show you the way to login, issue a command, and log off a Unix system.
The fundamental things you need to know to use Unix are:
In order to log in to your Unix account, you need to get to a computer that can give you access to a Unix shell. You don't necessarily need to be at a Unix computer. You might be at a PC that allows you to open a Unix window, at a terminal that is dedicated to a Unix system, or a workstation that allows you to run Unix.
Check with whomever gave you your Unix account for your username and password. They will probably have written instructions for logging onto your account and a list of locations of computers where you can use Unix.
If you are using a personal computer with a Web browser, the most likely way you'll be able to login to your Unix account is by using telnet.
To telnet to your Unix account, you'll need to know your Unix host computer name. Your Unix host computer might have a name something like alphak.csd.uwm.edu. From your Web browser, use the "File / Open" option (or "Open URL" option) and, enter something this (use your correct Unix host computer name, of course) (use no spaces, use the : and the two /):
This should cause a Unix window to come up on your personal computer. Now you are ready to login.
You need to know your username and password. When you know these, protect this information, as anyone who learns your password could log in to your account, change or delete your files, and send email in your name. You don't have to protect your username. In fact, your username will be readily apparent to anyone to whom you send email. It is the combination of your username and password that gives you access to your Unix account.
To login, enter your username where prompted, hit the Return or Enter key, then enter your password and hit the Return key again. Here is a sample session.
username: john password: ********
Once you have logged in, you may see some greeting messages or messages of the day from the technicians responsible for keeping the computer up and running. Look at this demonstration of logging into (and logging off) a Unix acccount.
The fundamental way that you communicate with Unix is through a command-line interface called the shell. In the shell, you issue commands at the command line. Unix systems vary in how their command lines work. In these lessons, I'll use the dollar sign ($) to stand for the Unix prompt. The Unix prompt is simply a symbol that appears at the start of a command line to let you know that you are in the shell and that Unix is ready and waiting for your command. As you look at the examples in this lesson, don't type the $ itself.
Let's issue a Unix command, the date command to tell us the date and time:
$ date Fri Aug 29 09:32:32 CDT 2003 $
What I did to accomplish this was type on my keyboard the command itself, date, and then hit my Enter key. Your keyboard may have a "Return" key, and that will work too. That is all there is to issuing Unix commands. You type in the command, hit the "Enter" key, and then let the Unix do the work. If your command requires some response from Unix, such as the date command, Unix will display that response, by default, to the screen.
Unix is case-sensitive. You must type the commands using lowercase letters. The command date is going to work. The commands DATE or Date are not.
Remember to hit the Return or Enter key on your keyboard after you are done typing in the Unix command. If you don't hit the Enter key or the Return key, Unix will just keep waiting until you do.
When you use telnet to connect to a remote computer, the display in the telnet window will often be "funny"--not "funny" in terms of "HA HA" funny, but funny in terms of not working correctly and with jumbled characters. There are ways of coping with this. The first is the clear command. The clear command clears the screen of previously-entered commands and output. Try it. Type clear at the Unix prompt and hit return:
The clear command also seems to resolve some problems of how the telnet application displays output from the remote host. I usually issue the clear command right away when I login.$ clear $
If the clear command doesn't clear your screen, or you have some other "funny" problems, try the set command to tell the telnet client that it is a "vt100" terminal--an old standard for many types of display. Try this:
$ set term=vt100 $
Then try clear again.
Also, realize that some Troubleshooting Tips may help you see that working with Unix effectively requires not just knowledge of syntax, but a set of attitudes for coping with problems.
You need to know how to end your Unix session by logging off. Don't leave your Unix window open on a computer and just walk away. Someone could cause havoc with your files. To log off, just issue the exit command.
Your Unix window should go away. If not, try the command logoff or logout. Or try pressing the control and D keys on your keyboard simultaneously.
Access your Unix account, issue the date command, and then log off.