Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Linux mesg Command

Linux mesg Command

Linux Command Reference Linux Command Reference

The Linux mesg command is used to set a terminal's write permission.

When mesg is set to y, other users can use the write command to display messages directly on your screen.

Syntax

mesg [ny]

Parameters:

Example

Allow other users to send messages to the current terminal.

root's terminal



# mesg y //Allows sending messages in this terminal

Another regular user's terminal:



$ write root pts/4 

hello

hello

EOF //Ctrl+D 结束输入

root's terminal Terminal display



# 

Message from root@w3cschool.cc (as hnlinux) on pts/5 at 14:48 ...

hello

EOF

Linux Command Reference Linux Command Reference