I’m looking briefly at a Linux command every day for a month
Yesterday, I explored the
mesg command for turning on and off “yes I want people to be able to message me in this shell session”.
Today, I’ll look at ‘wall’. ‘wall’ means “Write to ALL” (nothing to do with wall time) and it broadcasts a message regardless of user
$ wall -g pi "hello pi people"
Then, on every terminal session for every user in the group
pi, I see “hello pi people” pop rudely into the terminal!
Root is able to add
--nobanner which removes the
Broadcast message from gavin@hostname (pts/0) (Wed Aug 12 06:57:56 2020): but obviously that could be confusing to users.
This command is useful for saying ‘hey everybody get off the server it’s about to blow’. Although, in this age of containers, it’s rare to see multiuser terminal access, but still, in an incident response scenario, running
who is a very good idea to make sure J Random Colleague isn’t also hacking on the box. If he is, message him with
write, and if he has
msg disabled, or there’s multiple people on the box, you can use
wall to say “get off the box, or we’re going to end up mutating the same state!”