How to broadcast a message to all users - using wall -

Sometimes as the administrator of a Linux Operating System Server,U may need to send a message to all users in a multi-user system.



There are some different ways to do this, but we will now see just one of them.

We will use wall

As the main input of wall is a file, we will first create our message file.

Let's say you want to tell users that in two more ours the main SQL database is going to be unavailable because of maintenance.

So type:

echo 'Please note that in two more hours, and for one hour, you will not be able to use the SQL database, please save all your job before, and quit any application using it'> message.txt

OK, now we have our message ready, it is time to send it to the users.

wall < message.txt

And something like this will appear on all terminals open.

Broadcast Message from root@debian
(/dev/pts/3) at 9:56 ...

Please note that in two more hours, and for one hour, you will not be able to u
se the SQL database, please save all your job before, and quit any application
using it

1 comment:

  1. The Indian state of Kerala has gone to the extent of mandating that all state high schools run Linux on their computers. China uses Linux exclusively as the operating system for its Loongson processor family to achieve technology independence. In Spain some regions have developed their own Linux distributions, which are widely used in education and official institutions, like gnuLinEx in Extremadura and Guadalinex in Andalusia.

    ReplyDelete

Thank You for your Comments, We will read and response you soon...