This article covers how Wall command works in Linux. Wall is a handy utility that helps a multi-user system admin to quickly notify other users to save their work before a system shutdown or reboots.
Here, you will see some examples of how to use the wall command to communicate with logged-in users.
There are times when multiple users are logged in to a server computer, and you - the system/network admin - need to, say, restart the server to perform some maintenance task.
Of course, the correct way is to inform all those who are logged in about the maintenance activity.
In Linux, there is a built in command line utility for this purpose called Wall.
What is wall command in Linux ?
As already mentioned, the wall command is used to send a message to all logged in users.
It's syntax is:
$ wall [-n] [-t TIMEOUT] [file]
How to use wall command?
Basic usage is very straight forward - just execute the 'wall' command and write the message you want to transmit on the standard input.
Once done, use the Ctrl+D key combination to signal the command that you're done writing the message:
How to remove header from broadcasted message?
In case you want to remove the header that appears with the broadcasted messages, you can do that using the -n command line option:
$ wall -n