UnixServerAdmin

Server Administration & Management

How to send a message to all users on linux system

To send a message to all login users on linux system, you can use wall command, which sends a message to everybody logged in with their message  permission set to yes. The message can be given as an argument to wall, or it can be sent to wall’s standard input. When using the standard input from a terminal, the message should be terminated with the EOF key (usually Control-D).

Examples
To send a message “Alert, Please disconnect from Server !”, type the following command

# wall
Alert, Please disconnect from Server !

When the message content is complete, press Control-D (CTRL+D) to send message to all users.

To display message “Alert, Please disconnect from Server !” to all admin group member use wall command with “–g” option as follows:

# wall -g admin
Alert, Please disconnect from Server !

When the message content is complete, press Control-D (CTRL+D) to send message to all users.

Advertisements

March 1, 2012 - Posted by | Tips & Tricks, Unix/Linux | , ,

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: