Write (Unix)
Unix command to send messages to another user by writing directly to their terminal
In Unix and Unix-like operating systems, write is a utility used to send messages to another user by writing a message directly to another user's TTY.
01History
The write command was included in the First Edition of the Research Unix operating system. A similar command appeared in Compatible Time-Sharing System.
02Sample usage
The syntax for the write command is:
$ write user [tty] messageThe write session is terminated by sending EOF, which can be done by pressing Ctrl+D. The tty argument is only necessary when a user is logged into more than one terminal.
A conversation initiated between two users on the same machine:
$ write root pts/7 Hello!Will show up to the user on that console as:
Message from root@wiki on pts/8 at 11:19 ... Hello!Sources and credits
This article is adapted from the Wikipedia article “Write (Unix)”, written by its contributors and licensed under CC BY-SA 4.0. Fathomly has changed the layout, removed citation markers, navigation and maintenance notices, and adjusted punctuation. This adapted version is shared under the same license. For references, see the original article.
Fathomly is not affiliated with or endorsed by the Wikimedia Foundation. Spotted a problem? Tell us.