Indiana University
University Information Technology Services
What are archived documents?

Login is for authorized groups (e.g., UITS, OVPIT, and TCC) that need access to specialized Knowledge Base documents. Otherwise, simply use the Knowledge Base without logging in.


In Unix, how do I send a brief interactive message to someone?

Using the msg command

On some Unix computers, you can send a quick message using the msg command. To send a message, enter:

msg username@host This is the message being sent

Replace username@host with the address of the person to which you want to send the message, and This is the message being sent with your message.

For example, to send the message "Hey Darth, do you have my printouts?" to the user , at the Unix prompt, enter:

msg Hey Darth, do you have my printouts?

The following message will appear on your recipient's screen:

yourname@yourhost.yourdomain: Hey Darth, do you have my printouts?

Your address would replace yourname@yourhost.yourdomain.

Some Unix computers cannot receive msg messages. At Indiana University, most UITS hosts are not configured to do so. Also, msg is not installed on some hosts, and you may need to use the write command instead.

Using the write command

You can also use the write command to send a message. This command can send several lines of text to another user logged into the same Unix computer. Here is an example of the write command:

write fred Hey fred! Did you bring your homework with you? ^D

The ^D stands for  Ctrl-d . Press this to end the write message.

Below is a sample of the output of write:

Message from yourname@yourhost.yourdomain on ttyr2 at 14:13 ... I don't have my homework with me My dog ate it <EOF>

EOF stands for "End Of File" and signifies the end of the message being sent.

Turning messages on and off

The msg and write commands won't work if a user is refusing messages. The mesg command will turn on or off the ability to receive messages. To turn on messages, enter:

mesg y

To turn off messages, enter:

mesg n

At Indiana University, for personal or departmental Linux or Unix systems support, see At IU, how do I get support for Linux or Unix?

This is document acjl in domain all.
Last modified on August 22, 2008.

I need help with a computing problem

  • Fill out this form to submit your issue to the UITS Support Center.
  • Please note that you must be affiliated with Indiana University to receive support.
  • All fields are required.

Please provide your IU email address. If you currently have a problem receiving email at your IU account, enter an alternate email address.

I have a comment for the Knowledge Base

  • Fill out this form to submit your comment to the IU Knowledge Base.
  • If you are affiliated with Indiana University and need help with a computing problem, please use the I need help with a computing problem section above, or contact your campus Support Center.