This tutorial explains Linux “wall” command, options and its usage with examples.
Wall sends a message to everybody logged in with their mesg permission set to yes. The message can be given as an argument to wall, or it can be sent to wall’s standard input. When using the standard input from a terminal, the message should be terminated with the EOF key (usually Control-D).
The length of the message is limited to 20 lines.
wall displays the contents of file or, by default, its standard input, on the terminals of all currently logged in users. The command will cut over 79 character long lines to new lines. Short lines are white space padded to have 79 characters. The command will always put carriage return and new line at the end of each line.
Only the superuser can write on the terminals of users who have chosen to deny messages or are using a program which automatically denies messages.
wall [-n] [-t TIMEOUT] [file]
-t, –timeout TIMEOUT
Write timeout to terminals in seconds. Argument must be positive integer. Default value is 300 seconds, which is a legacy from time when people ran ter‐ minals over modem lines.
Output version and exit.
Output help and exit.
1. Simple Example
$ wall there is hope
Typing the above command from root would broadcast “there is hope” to all other users terminal who are logged into the computer. Below is output of what each terminal would show after the wall post.
Broadcast message from root (pts/1) (Thu May 23 08:28:21 2013): there is hope
2. Sending message using echo
echo AWESOME | wall
Sends the message “AWESOME” to all users.
Sanfoundry Global Education & Learning Series – 1000 Linux Tutorials.