English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Linux mesg command

Linux Command大全

The Linux mesg command is used to set the write permission of the terminal.

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

Syntax

mesg [ny]

Parameter:

  • n Do not allow other users to display information directly on your screen.
  • y Allow other users to display information directly on your screen.

Online Examples

Allow other users to send messages to the current terminal.

root's terminal

# mesg y //Set up this terminal to allow sending messages

Other ordinary users' terminal:

$ write root pts/4 
hello
hello
EOF //Ctrl+D End Input

root's terminal Terminal Display

# 
Message from [email protected] (as hnlinux) on pts/5 at 14:48 ...
hello
EOF

Linux Command大全