Send a massive message to the connected users

How can I send a message for all the users connected into the system at the same time? Let's say I need to reboot the server and I ask the users to save their jobs becasue the server will be rebooted?

man wall

regards

Thanks lijiajin,

Here is a bit more info for the command:

wall

This commands stands for: write all and is used to send messages to the currently logged users.

It is usually located in this directory:

/usr/bin/

This directory is not defined in the PATH so you will have to type in your shell the full path name to invoke it as follows:

/usr/bin/wall

For more information about this command and arguments to use, see:

man wall

i think you mean something like:

/usr/bin/wall

/etc ist for config files... (afaik)

Yep, you're right. :slight_smile: Thanks!

Looking up for some information in the web I also find the command:

rwall

Which also sends messages to all users on the network, here are some variants of the command:

Send a message to a specified host:

/usr/sbin/rwall hostname

Send a message to a specified network:

/usr/sbin/rwall -n network-group

Send a message to a specified host on a network:

/usr/sbin/rwall -h hostname -n network-group

You can check for some information related with this command right here:Commands Reference, Volume 4 - rwall Command