The description for the wall command states that it sends a message to all logged in users. However, the man page describes a flag, -g --group, which allows the sender to limit messages to a specified group:

-g, --group group Limit printing message to members of group defined as a group argument. The argument can be group name or GID.

However, I am only able to send messages to all logged in users. I have tried this command with:

  • -g my_group,
  • --group my_group,
  • -g "my_group",
  • --group "my_group",
  • --group=my_group

In addition, I have tried all of the above by replacing "my_group" (the group name) with the group ID to no avail.

I have also tried placing the flags after the message. None of this works to limit the messages to a given group. All messages go to all users. Am I misunderstanding the flag? The syntax? Is this command broken? Or is the man page simply incorrect? Please do not offer alternative commands, I am aware of their existence. I want to know how to use a listed option or why the option is not working correctly. I am using Ubuntu 20.04

  • Haven't tried to reproduce it, but I vaguely remember something similar :) Jun 23 at 17:51

1 Answer 1


Looked at the group membership checking code. Had a round of gdb --args wall -g root foobarbaz,

break is_gr_member
{wait for breakpoint to be hit}
print utmpptr->ut_user # this prints my own user name
step # this shows we're actually taking the branch as if I was a member of group root

So, yeah, that's a bug in wall's checking of group membership as it seems. Feel free to open a bug report on their bug tracker; however, honestly, the pressure to fix this should be very low! I doubt there's many legitimate users of this feature. Fixing this yourself would probably be pretty valuable, still, and if you have the C skills, please do that.

  • Marking this as the answer because I asked, "Is the command broken?" And it appears there is a bug. Thanks!
    – Johnny
    Jun 24 at 19:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.