mesg—permits or denies messages resulting from the write command

mesg [ –n ] [ –y ]

mesg with argument -n forbids messages via write(1) by revoking nonuser write permission on the user's terminal. mesg with argument -y reinstates permission. All by itself, mesg reports the current state without changing it.

Get Linux Shells by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.