Sometimes you may be interested in sending a message to some or every user connected to the same machine as you. There is probably a large list of possibilities, but I will be documenting only two of them:


This command displays the contents of a file or a standard input on the terminals of all currently logged in users. This is usually done via a text file, but as with any other program, it can receive the output of other commands.

Note that you must be a privileged user (e.g. root) for this command to work.

Check this SuperUser comment for more details.


In case you prefer to send a message to a specific user, this command may be used as well. Just set the receiver’s name and the path to the receiver’s tty; then write the message and exit with Ctrl+C.

To identify which user and terminal is being used, use who first:

Then send a message to this user. For instance:

Check out the source at this Oracle’s blog.

Share on FacebookTweet about this on TwitterShare on Google+Share on RedditEmail this to someonePrint this page
Rate the usefulness:
(No Ratings Yet)