Miscellaneous

mesg

Control write access to your terminal — allow or deny messages from other users.

Synopsis

syntax
mesg [y|n]

Examples

Show current message permission status
mesg
Block messages from other users
mesg n
Allow messages from other users
mesg y

Common options

FlagDescription
yAllow messages
nDeny messages

About mesg

The `mesg` command control write access to your terminal — allow or deny messages from other users. Utility commands cover a broad range of everyday tasks from date manipulation and arithmetic to terminal control and system documentation.

These tools fill in the gaps between major categories and are frequently used in shell scripts, cron jobs, and interactive sessions. The command accepts 2 commonly used flags shown above, though the full set of options is available in the man page (`man mesg`).

The 3 examples on this page cover typical real-world usage patterns that you can copy and adapt for your own workflows.

Related commands

More Miscellaneous Commands

Other commands in the Miscellaneous category

Related tools