write command in Linux with Examples
Last Updated :
15 Apr, 2019
write command in Linux is used to send a message to another user. The write utility allows a user to communicate with other users, by copying lines from one user’s terminal to others. When you run the write command, the user you are writing to gets a message of the form:
Message from yourname@yourhost on yourtty at hh:mm ...
Any further lines the user enter will be copied to the specified user’s terminal. If the other user wants to reply, they must run write as well. When you are done, type an end-of-file or interrupt character. The other user will see the message ‘EOF’ indicating that the conversation is over.
Syntax:
write user [tty]
write command without any option: It will print the general syntax of the write. With the help of this, the user will get a generalized idea about how to use this command since there nothing like help option for the write command.
Example:
Share your thoughts in the comments
Please Login to comment...