wall —
write a message to users
wall displays the contents of file
  or, by default, its standard input, on the terminals of all currently logged
  in users.
Only the super-user can write on the terminals of users who have
    chosen to deny messages or are using a program which automatically denies
    messages.
  - -g
- Send messages to users in this group. This option may be specified
      multiple times, and any user in any of the specified groups will receive
      the message.
Awall command appeared in
  Version 7 AT&T UNIX. Support for
  -g was added in NetBSD 2.0
  (from OpenBSD 2.0).