Sometimes we need to notify another users connected by SSH in same server with a simple message like when we use ‘halt‘ or ‘init 0‘ commands. Ubuntu-based distros have a special program to it, it’s wall. Then, to send a broadcast message for all connected users in server terminal, you can use:
[bash]echo “Buy more beers guys” | wall[/bash]
Now, all of SSH users will receive a message like this:
1 2 3 4 |
Broadcast Message from carlos@server-rel (/dev/pts/0) at 13:53 ... Buy more beers guys |