Jump to content

wall (Unix)

From Wikipedia, the free encyclopedia
wall
Developer(s)AT&T Bell Laboratories
Initial releaseMay 1975;49 years ago(1975-05)
Operating systemUnixandUnix-like
TypeCommand

wall(an abbreviation of write to all) is aUnixcommand-lineutility that displays the contents of acomputer fileorstandard inputto all logged-in users. It is typically used by root to send out shutting down message to all users just beforepoweroff.

Invocation

[edit]

wallreads the message fromstandard inputby default when the filename is omitted. This is done bypipingthe output of theechocommand:

alice@sleipnir:~$ #`tty`toshowthecurrentterminalname
alice@sleipnir:~$tty
/dev/pts/7
alice@sleipnir:~$echoRemembertobrushyourteeth!|wall

The message may also be typed in much the same waycatis used: invokingwallby typingwalland pressing↵ Enterfollowed by a message, pressing↵ EnterandCtrl+D:

alice@sleipnir:~$wall
Remember to brush your teeth!
^D

Using ahere-string:

alice@sleipnir:~$wall<<<'Remember to brush your teeth!'

Reading from a file is also supported:

alice@sleipnir:~$cat.important_announcement
Remember to brush your teeth!
alice@sleipnir:~$wall.important_announcement# same as `wall!$`

All the commands above should display the following output on terminals that users allow write access to (seemesg(1)):

Broadcast Message from alice@sleipnir
(/dev/pts/7) at 16:15...

Remember to brush your teeth!

See also

[edit]

References

[edit]