Permits or refuses write messages.
The mesg command controls whether other users on the system can send messages to you with either the write command or the talk command. Called without arguments, the mesg command displays the current workstation message-permission setting.
The shell startup process permits messages by default. You can override this default action by including the line mesg n in your $HOME/.profile file. A user with root user authority can send write messages to any workstation, regardless of its message permission setting. Message permission has no effect on messages delivered through the electronic mail system (sendmail).
If you add mesg y to your $HOME/.profile, you will be able to receive messages from other users via the write command or the talk command.
If you add mesg n to your $HOME/.profile, you will not be able to receive messages from other users using the write command or the talk command.
This command returns the following
exit values:
0 | Receiving messages is allowed. |
1 | Receiving messages is not allowed. |
>1 | An error occurred. |
mesg
Information similar to the following is displayed:
is y
In the previous example, the current message-permission setting is y (allowing all users on the local network the
permission to send messages to your workstation). If you change the
message-permission setting to n (allowing
only the root user the permission to send messages to your workstation),
information similar to the following is displayed:
is n
/dev/tty* | Supports the controlling terminal interface. |
$HOME/.profile | Controls startup processes and daemons. |
The sendmail command, talk command, write command.
Network Overview in AIX 5L Version 5.1 System Management Guide: Communications and Networks.