1. Home
  2. Computing & Technology
  3. Focus on Linux
Linux / Unix Command: mesg
Command Library

NAME

mesg - control write access to your terminal  

SYNOPSIS

mesg [y|n]  

DESCRIPTION

Mesg controls the access to your terminal by others. It's typically used to allow or disallow other users to write to your terminal (see write(1)).  

OPTIONS

y
Allow write access to your terminal.
n
Disallow write access to your terminal.

If no option is given, mesg prints out the current access state of your terminal.

Mesg assumes that it's standard input is connected to your terminal. That also means that if you are logged in multiple times, you can get/set the mesg status of other sessions by using redirection. For example "mesg n < /dev/pts/46".  

SEE ALSO

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


Important: Use the man command (% man) to see how a command is used on your particular computer.

>> Linux/Unix Command Library

>> Shell Command Library

Explore Focus on Linux

More from About.com

  1. Home
  2. Computing & Technology
  3. Focus on Linux

©2008 About.com, a part of The New York Times Company.

All rights reserved.