How to send a broadcast message on Ubuntu-based distros

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: