UNIX structure

Working With UNIX

[Shell |Prompt |Command Line |Changing Passwords |Logging On |Logging Off |Documentation |Exercises]

UNIX Shell

The UNIX shell is the program that interacts with the user. The two most common shells are the Bourne shell (sh), and the C shell (csh). These programs interpret what the user types in, and executes the commands. When you log in, you will have a shell run for you. You can run a different shell by typing in the shell name at the prompt:

larry% csh

to run a C shell, and

larry% sh

to run a Bourne shell.

You can change your login shell by using the chsh command.

man chsh for more information.

To exit the current shell, type:

larry% exit

If the current shell is your login shell, this command will log you off.

Note: The shell is assumed to be the C shell from now on.

UNIX Prompt

The UNIX prompt is a short line of text prompting your for the next command. It is usually the host name followed by a "%" character. On my machine larry, the standard prompt is:

larry%

If so desired, the user may set the prompt to something else.

Command Line

This is the area right after the prompt in which the user may type in commands.

Changing Passwords

Passwords should not be known by anyone else except you. It is necessary to change your password when someone else knows about it, and a good idea to change it every now and then. This can be done using the passwd command.

larry% passwd

You will then be prompted for your current password:

Old Password:

Enter your current password. The text will not be displayed on the screen for others to see. It will then ask your for a new password:

New Password:

Enter your new password. A password should be six to eight letters long. It should not be a word in any dictionary of any language. It should also not be something easily guessed about you (your name does not make a good pass word). For added security, it is good to have a mix of upper and lower case and maybe some symbols (some machines may require this). The text will again not be displayed on the screen.

You are then asked to retype your pass word.

Retype new password:

This makes sure that you didn't make a mistake typing in your password. If the retyped pass word does not match the new password, your password will not be changed. The text is again not printed.

Login On

Login on is what you do to connect to the unix system. The system first asks you for your login name. It then asks you for your password. For example, when I log on to my machine, larry, I get the following:


SunOS UNIX (larry)

login:

I then type in my login name, also known as user name:

login: schallee

The system then prompts me for my password: Password:

I then type in my password. The password is not displayed on the screen so that some one can not look over your shoulder when you log in and see your password. If you typed in the wrong password, or the wrong user name, the system displays a

Login incorrect

message, and prompts you for your login name again. Type in the correct login name and password.

Once you have successfully logged in, the system displays usually displays some information and then runs your login shell.

Logging Off

To log off the system, all you need to do is type in the logout command.

larry% logout

You can also end your shell, which also ends your connection by typing

larry% exit

On Line Documentation

On line documentation is accessible through the man command. man is short for manual. To use it, type in man and the command you wish to get the manual page for. For example, to get a manual page on man command, type:

larry% man man

Exercises

  1. Log on to the system with your login name and password.



    SunOS UNIX (larry)

    login: schallee
    Password:
    Last login: Mon Jul 10 09:01:51 from larry.darkmist.net
    SunOS Release 4.1.4 (GENERIC) #2: Fri Oct 14 11:08:06 PDT 1994


    larry%

  2. Get the manual page on man.

    larry% man man

  3. Log off they system with the logout command.

    larry% logout


[Back|Contents|Next]

Edward B. Schaller (schallee@earthlink.net)