Previous Table of Contents Next


COMMUNICATING WITH OTHER USERS

UNIX provides multiple ways to communicate with other users. There are commands to communicate interactively or by electronic mail (E-mail). The following is a brief overview of some of the more common commands used to communicate with fellow users.

WRITING TO A USER

The write command allows you to write to a user that is currently logged on to the system. The following steps show how to "talk" to a user with write.

1.  First you must find out who is available for you to write. Type who and press Return. This will display who is currently on the system. Select a user to write to and continue on to the next step.
   cj> who
   bill          tty05       Jan 11 08:41
   nancy         tty07       Jan 11 08:03
   mylogin       tty11       Jan 11 09:05
   nasser        tty18       Jan 11 07:49
   smr           tty23       Jan 11 09:11
   tlp           tty09       Jan 11 07:38
2.  Type write bill and press Return. Now type a message you would like to send to bill. When you finish writing your message press Ctrl-D.
   cj> write bill
   Hi Bill,
   This is Robert. I finally got my UNIX login and am trying to
   annoy all other users so they will log off the system and
   response time will improve. Have a great day and LOG OFF the
   system now!.
   ^D

NOTE:  
While you are typing your message you may see text intermixed with what you are typing. This is probably one line of a response message from the person you are writing.



RECEIVING MESSAGES FROM WRITE

If someone is sending you a message from write, you can perform the following steps to respond.

1.  First you will receive a message and a beep when someone writes to you.
   Message from bill tty5...
2.  Respond by typing write bill and pressing Return. From this point forward you continue your communication as if you had initiated the conversation.

SENDING MAIL

You can send mail to a user by using the mail command.

The mail command reads in a message and sends it to a mailbox for the specific user. The following steps show how to send a simple letter to a user on your local system.

1.  First you must know to whom to send the letter. To retrieve a list of all users on your local UNIX System type nawk -F: '{print $1" "$5}' /etc/passwd | sort | more and press Return.
2.  Select a user name and type mail nancy and press Return. Now you may type the letter you wish to send to nancy. After you finish the letter, press Ctrl-D to send the letter to nancy. Replace nancy with the name of a user on your system.

RECEIVING MAIL

To receive mail, a user must first send mail to your user name. If no one likes you and you never receive mail you can always send mail to yourself. This is very common practice; it provides an on-line reminder service. The following steps show how to read any mail that may have been sent.

1.  Type mail and press Return. Notice the message you requested your system administrator to send you is displayed. If there's no mail you probably have a very busy system administrator.
2.  The mail utility has a help feature that provides some insight to using it more effectively. Type ? or help and press Return. Notice a screen of information on the mail utility is displayed.

NOTE:  
There are two major versions of the mail utility. One is UNIX System V and the other is Berkeley based. The Berkeley version is supplied with System V as mailx, although it is possible that it has been moved to the mail name. This book discusses the Berkeley /usr/ucb/Mail version and the System V /bin/mailx version of mail and refers to it as mail/mailx.



LOGGING OUT OF THE SYSTEM

To log out of UNIX you must exit the shell. There are multiple ways of exiting the shell; the most common is pressing Ctrl-D. You may also type exit and press Return or, on some systems, you may type logout and press Return.

Turn to Module 3 to continue the learning sequence.


Previous Table of Contents Next