Skip to content

wall command in MacOS

The wall command in MacOS allows users to broadcast messages to all logged-in users on a system. By using this command, you can efficiently communicate with multiple users simultaneously without the need for individual messages. This can be especially useful for system-wide announcements or alerts. The wall command takes a message as input and displays it on the terminal of all users currently logged in.

Terminal window
wall [message]
OptionDescription
-nSuppresses the hostname prefix on each line of the message.
-hPrints a help message with usage information.
ParameterDescription
messageSpecifies the message to be broadcast to all users.
Terminal window
wall "Please note that the system will undergo maintenance tomorrow."

Sends a broadcast message to all users with the specified text.

Terminal window
wall "WARNING: Server will be shut down in 10 minutes for maintenance."

Sends a warning message to all users about an impending server shutdown.

Terminal window
wall "All users are required to save their work as the system will be restarted."

Sends a customized message to alert users about an upcoming system restart.

Terminal window
wall "Attention: There is a security breach, please log off immediately."

Notifies all users about an urgent security issue and instructs them to log off.

Terminal window
echo "Don't forget to backup your data regularly." | wall

Uses a pipeline to send a reminder message to all users to backup their data.

Send a Notification to All Users with Important Information

Section titled “Send a Notification to All Users with Important Information”
Terminal window
cat notification.txt | wall

Reads the content of a file named “notification.txt” and sends it as a message to all users.

Broadcast System Maintenance Message with Timestamp

Section titled “Broadcast System Maintenance Message with Timestamp”
Terminal window
echo "$(date): System maintenance in progress. Please bear with us." | wall

Includes the timestamp along with the message to inform users about ongoing maintenance.

Terminal window
while true; do echo "Check your email for important notifications." | wall; sleep 3600; done

Sends periodic updates to all users reminding them to check their emails for notifications.

To use the wall command in MacOS, execute the following command:

Terminal window
wall --n

How can I broadcast a message to all users in MacOS using wall?

Section titled “How can I broadcast a message to all users in MacOS using wall?”

To broadcast a message to all users in MacOS, use the following command:

Terminal window
echo "Your message here" | sudo wall

How do I specify a file as the input for the wall command in MacOS?

Section titled “How do I specify a file as the input for the wall command in MacOS?”

To specify a file as the input for the wall command in MacOS, you can use the following command:

Terminal window
wall < path_to_file.txt

How can I display a message on all terminals in MacOS using wall?

Section titled “How can I display a message on all terminals in MacOS using wall?”

To display a message on all terminals in MacOS, use the following command:

Terminal window
echo "Message for all users" | wall

How do I show the current implementation of wall in MacOS?

Section titled “How do I show the current implementation of wall in MacOS?”

To show the current implementation of wall in MacOS, execute the following command:

Terminal window
which wall

How can I check the manual page for wall command in MacOS?

Section titled “How can I check the manual page for wall command in MacOS?”

To check the manual page for the wall command in MacOS, use the following command:

Terminal window
man wall

How do I set the priority of a message when using wall in MacOS?

Section titled “How do I set the priority of a message when using wall in MacOS?”

To set the priority of a message when using wall in MacOS, you can use the following command:

Terminal window
echo "High Importance Message" | sudo wall -n

How can I broadcast a message to a specific user using the wall command in MacOS?

Section titled “How can I broadcast a message to a specific user using the wall command in MacOS?”

To broadcast a message to a specific user using the wall command in MacOS, you can use the following command:

Terminal window
echo "Message for specific user" | sudo wall -u username
  • Broadcasting messages to all users on a Unix or macOS system.