Previous Table of Contents Next


Typing a Short Message to an Individual User

Use these steps to send a short, one-time message to an individual user:

1.  Type write username and press Return. username is the login name of the user.
2.  Type the message you want to send.
3.  When the message is complete, press Control-D. The message is displayed in the user's console window.
Here is an example of a message a system administrator might type:
oak% write ignatz@elm
I'll come by at 12:ØØ to look at your problem.
oak%

This is how the message would display in the user's console window:
Message from fred@oak on ttyp1 at 11:2Ø ...
I'll come by at 12:ØØ to look at your problem.
EOF

Sending a Message from a File to an Individual User

If you have a longer message that you want to send to a number of users, follow these steps to create the message in a file and then use the file name as an argument to the write command:

1.  Create a file containing the text of the message you want to send.
2.  Type write username < filename and press Return.

In this example, the system administrator uses the cat command to create a file containing a short message:

oak% cat > message
I'll come by at 12:ØØ to look at your problem.
oak% write ignatz@elm < message
write: ignatz logged in more than once ... writing to console
oak%

If the user is logged in to more than one window, the message is displayed in the console window. This is how the message displays in the user's console window:

Message from fred@oak on ttyp1 at 11:2Ø ...
I'll come by at 12:ØØ to look at your problem.
EOF

As you can see, the user doesn't see any difference in the output created from a typed message and the message included from a file. The user can initiate a dialogue by using the write command to respond, but the dialogue is not truly interactive. There are two write paths open, one in each direction. See the write(1) manual page for more information. For more information about manual pages, see Chapter 2, "Using Basic OS Commands."

Sending a Message to All Users on a System or Network

You can use the wall (write all) command to simultaneously send a message to every user on a system. You can use the rwall (remote write all) command to simultaneously send a message to every user on a network.

To send a message to all users on a system:

1.  Type wall and press Return.
2.  Type the message you want to send.
3.  When the message is complete, press Control-D. The message is displayed in the console window of each user on the system.

This is an example of a message a system administrator might type:

oak% wall
System will be rebooted at 12:ØØ.
oak%

This is how the message would display in the users' console windows:

Broadcast message from root on console ...
System will be rebooted at 12:ØØ.
EOF


NOTE:  Use the rwall command carefully because it consumes extensive system and network resources.

To send a message to all users on a network:

1.  Type rwall -n netgroup and press Return.
2.  Type the message you want to send.
3.  When the message is complete, press Control-D. The message is displayed in the console window of each user on the system.

This is a message the system administrator might type to send to all members of the netgroup Eng:

oak% rwall -n Eng
System oak will be rebooted at 12:00.
oak%

This is how the message would display in the users' console windows:

Broadcast message from root on console ...
System will be rebooted at 12:ØØ.

You can also use the rwall command to send a message to all users on a system by typing rwall hostname.

Sending a Message by E-Mail

E-mail is an effective way to communicate some system administration informational messages. However, this book does not describe how to use electronic mail. See the mail(1), mailtool(1), mailx(1), and dtmail(1X) manual pages for information about the mail programs.

Starting Up and Shutting Down Systems

Starting up and shutting down systems is an integral part of performing system administration tasks. This section describes procedures for routinely starting up and shutting down systems. If a system does not start up gracefully, see your system documentation for information on how to diagnose booting problems.

The SunOS 5.x system software is designed to be left running continuously so that the e-mail and network software can work correctly. You must, however, halt or shut down a system when:

  Turning off system power
  Installing a new release of the operating system
  Anticipating a power outage
  Adding hardware to the system
  Performing maintenance on a file system


Previous Table of Contents Next