Previous | Table of Contents | Next |
DESCRIPTION
The external mesg command allows or denies other users the privilege of sending messages to your terminal screen. By using the mesg command you can prevent people from write ing or talk ing to you while you are logged on the system.
COMMAND FORMAT
The general format of the mesg command follows .
mesg [ -n -y ]
Options
The following list describes the options and their arguments that may be used to control how mesg functions.
-n | Prevent other users from sending messages to your terminal. |
-y | Allow other users to send messages to your terminal. |
If no options are given the current message mode is returned.
FURTHER DISCUSSION
If you keep getting interrupted by other users, enter
cj> mesg n cj> mesg # use mesg alone to check current state
and you can continue on in peace . The mesg command only works for the current login session. If you log out and back in, you must reset the mesg mode as desired. The default is to allow other users to send messages to you.
The mesg command prevents other users from writing to your terminal by changing the write permission for others on your /dev/ttyXX terminal port.
RELATED COMMANDS
Refer to the write and talk commands described in modules 161 and 132, respectively.
RELATED FILES
All /dev/tty* terminal files are valid for message mode control.
RETURN CODES The mesg command returns the following codes:
messages are allowed | |
1 | messages are denied |
2 | mesg failed with an error |
APPLICATIONS
The mesg command is used to control when people can and cannot interrupt your work by writing to your terminal screen. It is automatically turned on when you are in vi . This prevents other users from garbling your edit screen. It is a desirable feature if someone keeps bothering you and you are starting to become annoyed.
TYPICAL OPERATION
In this activity you use the mesg command to deny other users write permission to your terminal, then you set the mesg mode back. Begin at the shell prompt.
Previous | Table of Contents | Next |