MESG(1) General Commands Manual MESG(1)

mesgpermit or deny messages

mesg [y|n]

mesg controls whether other users are allowed to send messages to the current terminal, determined via searching for a TTY on stdin, stdout, stderr. If none were found, mesg fails.

y
Allow other users to write to current terminal
n
Deny other users from writing to current terminal

0
Other users can write.
1
Other users cannot write.
>1
An error occurred.

talk(1), write(1)

mesg should be compliant with the IEEE Std 1003.1-2024 (“POSIX.1”) specification.

Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>

September 19, 2025 Linux