write

Send information to the specified login user terminal

Supplementary instructions

write command is used to send information to the specified login user terminal. The write command can be used to transfer information to another user who logs in to the system. After the input is completed, type EOF to indicate the end of the information, and the write command will transfer the information to the other party. If the user receiving the message logs into the local host more than once, you can specify the terminal number to which the message will be sent.

grammar

write(parameter)

Parameters

User: Specify the login user to receive information;
Login terminal: Specify the login terminal of the user who receives the information.

Example

Send the message to Rollaend. At this time, Rollaend has only one connection:

write Rollaend

The next step is to type the information and press Ctrl+C to finish:

The connections to send information to Rollaend and Rollaend are pts/2 and pts/3:

write Rollaend pts/2

The next step is to type the information and press Ctrl+C to finish:

If the other party sets mesg n, the message will not be sent to the other party at this time.