wall
is a command-line utility that displays a message on the terminals of all logged-in users. The messages can be either typed on the terminal or the contents of a file. wall stands for write all, to send a message only to a specific user use the write
command.
Usually, system administrators send messages to announce maintenance and ask users to log out and close all open programs. The messages are shown to all logged-in users with a terminal open. Users using a graphical desktop environment with no terminal open will not see the messages. Each user can control the write access to its terminal with the mesg utility. When the superuser invokes the wall
command, all users receive the messages, no matter their mesg
settings.
The syntax for the wall
command is as follows:
wall [OPTIONS] [<FILE>|<MESSAGE>]
Copy
If no file is specified wall
reads the message from the standard input.
The most straightforward way to broadcast a message is to invoke the wall
command with the message as the argument:
wall "The system will be restarted in 10 minutes."
Broadcast message from root@linuxize.host (pts/0) (Sun Oct 4 19:22:07 2020):
The system will be restarted in 10 minutes.
#linux