How to use the wall command on Linux

Do you need to send a short message to all logged in users? Linuxs wall The command is more powerful than e-mail and is automatically aimed at the logged in users. It sends a message to anyone who uses a terminal on a system.

The wall command

When you need to quickly send a message to the logged in users on your computer, what do you do? Email does not meet requirements. You don’t know when the email will be read. If people need to know something now, that’s not enough. Also, you don’t want to clog the inboxes of logged out users who don’t need to see the message.

Without additional effort and loss of time, you do not know who is logged in from where. Your system could be in Aberdeen, Washington but you may have logged in to remote users from Aberdeen, Scotland . So how can you target a message to the logged in users?

Linux and other Unix-like operating systems give you an easy way to do this. the wall Command is like a powerful telegram. It sends a message to all terminal users and places the message right under their noses. Users can’t miss it and they know they have it. You don’t have to choose to open an application to see if a message is waiting.

The delivery is as subtle as a pudding cake on your face.

Send a message

The test machine on which this article was researched was also installed Fedora Linux , but the wall Command behaves exactly the same on other distributions.

The only difference you might encounter is that you will have to use some Linux distros sudo on the option to send a message from a text file, while other distributions always have to use sudo with wall the whole time. This is actually a difference between Linux distributions, not a difference to the operation of the wall Command itself.

To send a message to all users, enter wall , a space, and then the message you want to send. With Fedora Linux, you have to use it sudo .

                      sudo wall Main printer offline until further notice.

Your message will be sent to all users who have opened a terminal window.

The local users RIa and Tom receive the message, as does the remote user Dick, who happens to be working on a computer running Ubuntu .

They all get the message at the same time and you won’t wonder if they saw it.

Sending a message from a file

You can prepare your message in a text file and save it ready for dispatch. When you have a repetitive cycle of messages that need to be sent, you can create a library of prepackaged messages so you don’t have to type them in over and over again.

The message in the text file message.txt was displayed with the in the terminal window cat Command to make sure it’s who we want to send.

The message is then sent by adding the name of the text file to the wall Command as command line parameter:

                      cat message.txt
                      sudo wall message.txt

As before, the local users Ria and Tom (and anyone else who is logged in with an open terminal window) and the remote user Dick will receive the message.

Messaging etiquette

Because that wall Command sends the message to all terminal users, no matter what, it can be a harrowing experience to receive one. usage of wall The command should be kept to a minimum and only used where there is a real need. Otherwise it will get very scratchy quickly.

A wall Message will overwrite everything else on the user’s terminal. It doesn’t actually overwrite anything – it doesn’t change the text it landed on – but it will obscure it. And that can be alarming to a user who doesn’t know.

Imagine if one of our local users is editing an important file in Vi just like that wall Message is being sent.

The message arrives in the middle of your file.

All our user has to do to get the file back to the correct view is to scroll up and down through the file a little.

It is easy to put the display in a state where work can continue and blood pressure can drop, but too many interruptions of this nature will leave you with a very angry group of users.

So as practical as wall use it with caution.

What about graphical desktop users?

the wall The command will reach anyone who has logged on with the terminal open, but it will not reach anyone using a graphical desktop environment without a terminal window open.

If someone was using a graphical desktop and opened a terminal window, it would appear in the terminal window – but that’s it. Do not enumerate wall to reach someone outside the terminal.

It’s not subtle, but you can’t deny that it gets the message across in a traditional terminal environment.

Linux commands
Files tar · pv · cat · tac · chmod · grep · difference · sed · With · man · pushed · popd · fsck · Test disk · seq · fd · pandoc · CD · $ PATH · awk · join · jq · wrinkles · unique · Journalctl · tail · stat · ls · fstab · echo · fewer · chgrp · chown · rev · look · Strings · Type · rename · Postal code · unzip · assemble · ummount · To install · fdisk · mkfs · rm · rmdir · rsync · df · gpg · weather · Nano · mkdir · from · ln · Patch · Convert · rclon · Scraps · srm
Processes alias · screen · above · kind · renice · progress · strace · system · tmux · chsh · story · at · Batch · for free · which · dmesg · chfn · User mod · ps · chroot · xargs · tty · pinkie finger · lsof · vmstat · Time out · Wall · Yes sir · kill · sleep · sudo · it is · Time · groupadd · User mod · groups · lshw · switch off · start anew · Stop · switch off · passwd · lscpu · crontab · date · bg · fg
Networking netstat · Ring · Trace route · ip · ss · who is · fail2ban · bmon · she · finger · nmap · ftp · curl · wget · who · who am I · w · iptables · ssh-keygen · ufw

Best Linux Laptops for Developers and Enthusiasts

Related Posts