wall Command in Linux: Broadcast Messages to Logged-In Users

By 

•

Updated on

•

8 min read

Using the Linux wall command to broadcast a message to all logged-in users

wall is a command-line utility that displays a message on the terminals of all logged-in users. The messages can be typed directly on the terminal or read from a file. wall stands for “write all”; to send a message to a specific user, use the write command. Ubuntu 26.04 and Debian 13 no longer ship write.

Usually, system administrators send messages to announce maintenance and ask users to log out and close all open programs. The messages are shown to users logged in on a terminal, such as a text console or an SSH session. Users working in a graphical desktop environment will not see the messages. Each user can control the write access to their terminal with the mesg utility, on systems that still ship it. When the superuser invokes the wall command, all users receive the messages, no matter their mesg settings.

In security updates for CVE-2024-28085, Ubuntu and Debian removed the setgid tty permission from wall. This also affects updated Ubuntu 20.04 and 22.04 and Debian 11 and 12, in addition to newer releases. A message sent by a regular user does not reach the terminals of other users, and wall does not report an error. Run wall with sudo to reach other users’ terminals.

wall Command Syntax

The syntax for the wall command is as follows:

txt
wall [OPTIONS] [<FILE>|<MESSAGE>]

If no file is specified, wall reads the message from the standard input.

wall accepts the following options:

  • -g, --group - Send the message only to members of the given group (name or GID)
  • -n, --nobanner - Do not print the banner (root only)
  • -t, --timeout - Give up writing to a terminal after this many seconds (default 300)
  • -h, --help - Display help and exit
  • -V, --version - Display version information and exit

Broadcasting a Message

The most straightforward way to broadcast a message is to invoke the wall command with the message as the argument:

Terminal
sudo wall "The system will be restarted in 10 minutes."
output
Broadcast message from root@ubuntu (pts/4) (Wed Oct 28 04:12:04 2026):

The system will be restarted in 10 minutes.

The first line is the banner. It shows the sender (root, because the command ran with sudo), the host name, the terminal the message was sent from, and the time.

The message will be broadcast to all users that are currently logged in. To see all logged-in users, run the w or who command. To see which sessions will receive the message, run loginctl list-sessions. Only sessions with a value in the TTY column get it.

To suppress the banner and show only the text to the logged-in users, invoke the command with the -n (--nobanner) option:

Terminal
sudo wall -n "The system will be restarted in 10 minutes."
output
The system will be restarted in 10 minutes.

Only root can suppress the banner. When a regular user passes -n, wall prints wall: --nobanner is available only for root and sends the message with the banner.

If you want to write multi-line messages, invoke the command without an argument:

Terminal
sudo wall

The wall command will wait for you to enter text. When you are done typing the message, press Ctrl+D to end the program and broadcast the message.

You can also pipe the output of another command to wall. Here is an example showing how to use the printf command to broadcast a multi-line message:

Terminal
printf "The system will be restarted in 10 minutes.\nPlease save your work.\n" | sudo wall
output
Broadcast message from root@ubuntu (pts/4) (Wed Oct 28 04:14:58 2026):

The system will be restarted in 10 minutes.
Please save your work.

Each \n sequence starts a new line. The echo command prints \n literally unless you add the -e option, so printf is the safer choice for multi-line messages.

Broadcasting a Message From a File

If you are regularly sending the same messages, you can write each one of them to a file, so that you do not need to re-type the same text. In normal usage, wall can read from a file as a regular user. File input is refused only in specific setuid/setgid scenarios when the invoker is not root.

To broadcast the contents of a file, invoke the wall command followed by the file name:

message1_file.txttxt
The system will be restarted in 10 minutes.
Terminal
sudo wall message1_file.txt
output
Broadcast message from root@ubuntu (pts/4) (Wed Oct 28 04:14:59 2026):

The system will be restarted in 10 minutes.

Broadcasting a Message to a Group

To send a message only to members of a given group, run the command with the -g (--group) option, followed by the group name. For example, to write only on the terminals of the members of the “devs” group, you would run:

Terminal
sudo wall -g devs "The system will be restarted in 10 minutes."

The group can also be specified by its GID (group ID). For more information on managing groups, see the groupadd command guide .

wall and SSH Sessions on Ubuntu 26.04

On Ubuntu 26.04 and Debian 13, users connected over SSH do not receive wall messages. You will not get an error, but the message reaches only console logins. Distributions that still keep utmp login records, such as Rocky Linux 10, are not affected.

wall gets the list of terminals from systemd, which tracks every login session. Ubuntu 26.04 and Debian 13 no longer keep utmp login records. Without them, systemd cannot tell which terminal an SSH login uses. You can see this with loginctl:

Terminal
loginctl list-sessions
output
SESSION  UID USER     SEAT  LEADER CLASS   TTY  IDLE SINCE
      2 1000 linuxize -     1537   manager -    no   -
      3 1000 linuxize seat0 1697   user    tty2 no   -
     79 1000 linuxize -     9193   user    -    no   -

3 sessions listed.

Session 79 is an SSH login. Its TTY column shows -, so wall skips it. Session 3 is the graphical desktop running on tty2.

The w command still shows the terminal of each SSH login. To send the message to every SSH user, you can write it to those terminals directly:

Terminal
for tty in $(w -h | awk '$2 ~ /^pts/ {print $2}'); do
  echo "The system will be restarted in 10 minutes." | sudo tee "/dev/$tty" > /dev/null
done

The awk filter picks the pts terminals from the TTY column of w, and tee writes the text to each one. The message arrives without the wall banner.

The warnings that shutdown and reboot send use the same session list, so SSH users on Ubuntu 26.04 and Debian 13 do not see those either.

Quick Reference

CommandDescription
sudo wall "message"Broadcast a message to all logged-in users
sudo wall -n "message"Broadcast without the banner header
sudo wall -g group "message"Broadcast to members of a specific group
sudo wall file.txtBroadcast the contents of a file
printf "msg\n" | sudo wallPipe a command’s output to wall
loginctl list-sessionsShow which sessions have a terminal

Troubleshooting

A user is not receiving the message
If you ran wall without sudo on a patched Ubuntu or Debian system, the message reaches only your own terminals. Run the command again with sudo. On systems where wall still has setgid tty permission, the user may have disabled write access to their terminal with mesg n. When wall is run as root, messages are delivered regardless of mesg settings. On Ubuntu 26.04 and Debian 13, SSH users do not receive the message at all; see wall and SSH Sessions on Ubuntu 26.04 .

Message does not appear for desktop users
wall writes only to the terminals of login sessions. Users logged into a graphical desktop environment will not see the broadcast, and terminal windows opened inside the desktop usually do not receive it either.

wall: will not read message1_file.txt - use stdin.
On systems where wall is installed setgid, it refuses to read a file for regular users. Run the command with sudo, or redirect the file to standard input instead: wall < message1_file.txt.

FAQ

What is the difference between wall and write?
wall sends a message to all logged-in users. The write command sends a message to a single specific user. Ubuntu 26.04 and Debian 13 no longer ship write.

Can a regular user run wall?
Yes, but on patched Ubuntu and Debian systems, the message reaches only the terminals that user owns. To reach other users, run sudo wall. On systems where wall still has setgid tty permission, recipients can block messages with mesg n, unless root sends them.

Why do some users not see the message?
The sender may have run wall without sudo, the user may have mesg n set on a system that still ships mesg, or the user may be logged into a graphical session only. On Ubuntu 26.04 and Debian 13, SSH sessions are skipped as well.

How do I schedule a wall message before a shutdown?
Use the shutdown command, which sends a wall message automatically before powering off. For example: sudo shutdown -r +10 "Rebooting in 10 minutes.". You can also use reboot for immediate reboots.

Does wall work over SSH?
On Ubuntu 24.04 and older releases and on Rocky Linux 10, yes, provided the sender has permission to write to the recipient’s terminal. Use sudo wall to reach other users on patched Ubuntu systems. On Ubuntu 26.04 and Debian 13, SSH sessions do not receive wall messages. See wall and SSH Sessions on Ubuntu 26.04 for the cause and a workaround.

Conclusion

The wall command writes a message on the terminals of all currently logged-in users. It is commonly used by system administrators before planned maintenance or shutdowns . On current Ubuntu and Debian releases, the message reaches other users only when wall runs with sudo, and on Ubuntu 26.04 and Debian 13, loginctl list-sessions shows which sessions will get it.

Linuxize Weekly Newsletter

A quick weekly roundup of new tutorials, news, and tips.

About the authors

Dejan Panovski

Dejan Panovski

Dejan Panovski is the founder of Linuxize, an RHCSA-certified Linux system administrator and DevOps engineer based in Skopje, Macedonia. Author of 1000+ Linux tutorials with 20+ years of experience turning complex Linux tasks into clear, reliable guides.

View author page