LinuxCommandLibrary

mesg

TLDR

Check current status

$ mesg
copy
Disallow messages
$ mesg n
copy
Allow messages
$ mesg y
copy
Enable verbose mode
$ mesg --verbose
copy

SYNOPSIS

mesg [y | n]

DESCRIPTION

mesg controls whether other users can send messages to your terminal using the write command. Without arguments, it displays the current setting.

PARAMETERS

y

Allow messages from other users
n
Disallow messages from other users
-v, --verbose
Print warning if not executed from terminal

OUTPUT

Without arguments shows:
is y: Messages allowed
is n: Messages disallowed

CAVEATS

Affects the current terminal only. Setting is not persistent across sessions. Some terminals may default to denying messages.

SEE ALSO

write(1), talk(1), wall(1)

Copied to clipboard