Linux write command
The Linux write command is used to send messages to other users.
Permission: All users.
Syntax
write user [ttyname]
Parameter description:
- user: The account of the user you intend to send a message to.
- ttyname: If the user has more than one tty connection at the same time, you can choose the appropriate tty to send the message.
Examples
Send a message to Rollaend, at this time Rollaend has only one connection.
write Rollaend
Next, just type the message. When finished, press Ctrl+C.
Send a message to Rollaend, Rollaend's connections include pts/2 and pts/3.
write Rollaend pts/2
Next, just type the message. When finished, press Ctrl+C.
Note:If the other party has set mesg n, then the message cannot be delivered to them.
Other Extensions
Linux Commands