How to Use the wall Command on Linux

Share

Fatmawati Achmad Zaenuri/Shutterstock.com

Need to get a quick message out to all logged-in users? Linux’s wall command is punchier than email and auto-targets the logged-in users. It broadcasts a message to everyone using a terminal on a system.

The wall Command

If you need to get a message out—fast—to the logged-in users of your computer, how do you do it? Email doesn’t satisfy the requirements. You don’t know when the email will be read. If you need people to know something right now, that doesn’t cut it. And anyway, you don’t want to clog up the inboxes of logged-out users who don’t need to see the message.

Without exerting a bit of extra effort and wasting some time, you’re not going to know who is logged in and from where. Your system could be located in Aberdeen, Washington but you might have remote users logged in from Aberdeen, Scotland. So how can you target a message specifically at the logged-in users?

Linux and other Unix-like operating systems give you a simple way to do this. The wall command is like a forceful telegram. It will deliver a message to all terminal users, and it dumps the message right under their nose. The users can’t miss it, and you know they’ve got it. You don’t need them to choose to open an application to see if they have a message waiting.

The delivery is as subtle as a custard pie in the face.

Sending A Message

The test machine that this article was researched on was installed with Fedora Linux, but the wall command will behave precisely the same on other distributions.

The one difference you might encounter is some Linux distributions require you to use sudo on the option for sending a message from a text file, while other distributions require you always to use sudo with wall all the time. That’s actually a difference between Linux distributions, not a difference to the operation of the wall command itself.

To send a message to all users, type wall, a space, then the message you wish to send. With Fedora Linux, you must use sudo.

sudo wall Main printer offline until further notice.

wall command in a terminal window

Read the remaining 29 paragraphs

Source : How to Use the wall Command on Linux