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
msg command. To send a message, enter:
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
firstname.lastname@example.org , at the Unix
The following message will appear on your recipient's screen:email@example.com: Hey Darth, do you have my printouts?
Your address would replace
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
^D stands for
Ctrl-d . Press
this to end the
Below is a sample of the output of
EOF stands for "End Of File" and signifies the end of the
message being sent.
Turning messages on and off
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:
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?
Last modified on August 22, 2008.