Would you like to send a message to all registered users? The command wall
The command wall
What if you want to quickly send a message to the logged in user of your computer? E-mail does not meet the requirements. They do not know when the email is read. If you need someone who knows something, that's no problem. Also, you do not want to block the inboxes of logged-out users who do not need to see the message.
Without additional effort and without loss of time you will not know who is logged in and from where. Your system may be located in Aberdeen, Washington, but there may be remote users from Aberdeen, Scotland. So how can you target a message to the logged in users?
Linux and other Unix-like operating systems provide you with an easy way to do this. The command
wall is like a haunting telegram. A message is sent to all terminal users and the message is placed directly under their nose. Users can not miss it and you know they have it. You do not have to choose to open an application to see if you're waiting for a message.
The transmission is as subtle as a pudding cake in the face.
Sending a message
The test computer sending the message This article was examined and installed with Fedora Linux, but the command
wall behaves the same way in other distributions.
The only difference you might encounter is that you need to use some Linux distributions
sudo over the option to send a message from a text file, while other distributions require you to
sudo always with
wall use. This is actually a difference between Linux distributions, no difference to how the
wall command works.
To send a message to all users, enter
wall a space Message you want to send. On Fedora Linux, you must use
sudo wall main printer until further offline.
Your message will be sent to all users with a terminal window open.
The local users RIa and Tom receive the message, as well as the remote user Dick, who happens to be working on a computer running Ubuntu.
They all get you no longer have to wonder if they have seen the message.
Sending a message from a file
You can prepare the message in a text file and save it for sending. If you have a repetitive cycle of messages that need to be sent, you can create a library of ready-made messages so you do not have to re-enter them every time.
The message in the text file
message.txt was displayed in the terminal window with the command
cat to ensure that it is the message to be sent.
The message is then sent by passing the name of The text file for the command
wall as a command line parameter:
sudo wall message.txt
The local users Ria and Tom (and all other users who are logged in with an open terminal window) and the remote user Dick are still receiving the message. Wall message to Tom in a terminal window ” width=”646″ height=”242″ src=”/pagespeed_static/1.JiBnMqyl6S.gif” onload=”pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);” onerror=”this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);”/>
Since the command
wall forwards the message to all terminal users, it can be a harrowing experience to get one. The use of the command
wall should be kept to a minimum and used only where there is a real need. Otherwise, it will quickly become very scratchy.
wall message stamps everything that is on the user's terminal. It does not actually overwrite anything – it does not change the text it landed on – but it will cover it up. This can be alarming for a user who does not know this.
Imagine, one of our local users edited an important file in
Vi exactly as the
Wall message is sent.
The message arrives directly in the middle of its file.
To restore the correct view of the file, the user only has to scroll through the file a bit.
It's easy enough to put the ad in a state where work can continue and blood pressure drop, but too many interruptions of this kind will leave you with a very angry group of users.
As practical as
is wall use it as moderate.
What about graphical desktop users?
The command wall reaches all users who are logged in with the terminal open, but not all users who use a graphical desktop environment without an open terminal window.
If someone uses a graphical desktop and has a terminal window open, they'll see it in the terminal window – but that's it. Do not rely on
wall reaching someone outside the terminal.
This is not a decent one, but you can not deny that it conveys the message – in a traditional terminal environment.