“wall” Command Usage in Linux

«
»

This tutorial explains Linux “wall” command, options and its usage with examples.

wall – send a message to everybody’s terminal.

DESCRIPTION

advertisement

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.

advertisement
advertisement

SYNOPSIS

wall [-n] [-t TIMEOUT] [file]

OPTION :

-n, –nobanner
Supress banner
-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.
-V, –version
Output version and exit.
-h, –help
Output help and exit.

advertisement

EXAMPLES

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.

advertisement
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.

advertisement

Sanfoundry Global Education & Learning Series – 1000 Linux Tutorials.

If you wish to look at all Linux commands and their usage examples, go to Linux Commands Tutorial.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!
advertisement
advertisement
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He is Linux Kernel Developer & SAN Architect and is passionate about competency developments in these areas. He lives in Bangalore and delivers focused training sessions to IT professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux Networking, Linux Storage, Advanced C Programming, SAN Storage Technologies, SCSI Internals & Storage Protocols such as iSCSI & Fiber Channel. Stay connected with him @ LinkedIn | Youtube | Instagram | Facebook | Twitter