How to Use the wall Command to Broadcast Messages to Users in Linux

The Need for Emergency Communication

Because a Linux server is a true multi-user environment, it is common to have a dozen different developers, database engineers, and system administrators all logged into the exact same machine simultaneously via remote SSH connections.

If you discover that the server’s hard drive is failing, and you need to perform an emergency system reboot in exactly five minutes, you cannot simply type reboot. Doing so will instantly terminate everyone else’s active SSH sessions without warning, potentially corrupting any code they were compiling or databases they were migrating.

You need a way to instantly shout a warning message to every single person currently connected to the server. You can do this by using the wall (Write to All) command.

Step 1: Sending a Basic Broadcast

The wall command bypasses standard output logs and forces a text message to instantly appear directly on the active terminal screens of every currently logged-in user.

To send a quick warning, type the command followed by your message in quotes.

wall "SYSTEM ALERT: The server will be rebooting in exactly 5 minutes for emergency maintenance. Please save all work and log off immediately."

When you press Enter, every single user connected to the server will have their active typing interrupted. The terminal will abruptly push your message onto their screen, prefixed with the words “Broadcast message from [your_username] (pts/0)…”.

Step 2: Sending a Multi-Line Message

If you need to send a highly detailed, multi-line status report, typing it all into a single set of quotes can be messy.

You can use the wall command interactively. Simply type wall by itself and press Enter. The terminal will wait for your input.

wall
EMERGENCY MAINTENANCE
The primary database has failed over to the backup cluster.
Do not attempt to write new data to the master node until further notice.
Please check the #IT-Alerts Slack channel for live updates.

Once you are finished typing the entire message, you must tell the command to execute. You do this by pressing Ctrl + D (the standard Linux End-of-File signal). The moment you press Ctrl + D, the entire block of text will be broadcast simultaneously to all users.

Step 3: Silencing the Banner (Root Only)

When you send a normal broadcast, the Linux kernel automatically adds a noisy “Broadcast message from…” banner to the top of the text so people know who sent it.

If you are writing a custom bash script designed to send automated, clean system alerts (e.g., an automated temperature warning), you might want to suppress this noisy banner and only display your exact text.

If you are logged in as the root administrator (or using sudo), you can use the -n (no banner) flag.

sudo wall -n "WARNING: CPU Temperature exceeds 90C. Throttling initiated."

The users will only see the exact text you typed, making the alert look much cleaner and more official.

A Crucial Limitation

It is important to understand that the wall command only writes text to active TTY terminal sessions. If a user is logged into the server but they are actively running a full-screen, graphical application (like the nano text editor or the top process monitor), the wall message might completely overwrite the graphical interface of that app, temporarily breaking their screen layout until they press Ctrl + L to redraw it.

Furthermore, if a user has explicitly blocked terminal messages using the mesg n command, they will not receive your broadcast unless you are running the command as the root administrator, which overrides all user-level blocks.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.