Send System Messages to Server Users

If your server has multiple users, you might want an easy way to send messages to them and make sure they receive them. The best way to do that is to send it right in the console. One tool you can use to do just that is “wall”. With it, you can send messages to all logged in users at once, and unless they have specifically disabled it, they will receive it.

To send a message to logged in users, type wall, press Enter, type the message you want to send and finally press CTRL+D. For example, to send a test message:

# wall

This is a test message

[CTRL+D]

Output:

Broadcast Message from tavis@serverschool

(/dev/pts/2) at 20:35 …

This is a test message

If you do not want the “broadcast message” banner, simply use the “-n” option. This message will reach all users. It is particularly helpful if you want to tell them the server will be unavailable shortly due to maintenance.

# wall

This server will be unavailable in 5 minutes do to scheduled maintenance. Please save your work and log out.

For more information about wall, type “man wall” from the command line.











Comments: