Linux offers a variety of means for sending messages to users logged on to a server as explained in the two methods below.

 

In the first method, we will use wall command – write a message to all currently logged in users on the terminal as shown.

# wall "System will go down for 2 hours maintenance at 23 PM"

 

To disable the normal banner printed by the wall, for example:

Broadcast message from root@rootadminz (pts/2) (Tues May  8 23:10:45 2018):

 

Add the -n (Suppress the banner) flag, this however, can only be used by the root user.

# wall -n "System will go down for 2 hours maintenance at 23 PM" 

 

In the second method, we will use write command, which comes pre-installed on all if not most Linux distributions. It allows you to send a message to another user in the terminal using tty.

 

First check the all logged on users with the who command as shown.

$ who

 

There are currently two users are active on the system (rootadminz and root), now the user aaronkilik is sending a message to the root user.

$ write root pts/2 #press Ctrl+D  after typing the message. 

 

Bu cavab sizə kömək etdi? 0 istifadəçi bunu faydalı hesab edir (0 səs)