Menu
Home Explore People Places Arts History Plants & Animals Science Life & Culture Technology
On this page
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.

We don't have any images related to write (Unix) yet.
We don't have any YouTube videos related to write (Unix) yet.
We don't have any PDF documents related to write (Unix) yet.
We don't have any Books related to write (Unix) yet.
We don't have any archived web articles related to write (Unix) yet.

History

The write command was included in the First Edition of the Research Unix operating system.2 A similar command appeared in Compatible Time-Sharing System.3

Sample usage

The syntax for the write command is:

$ write user [tty] message

The 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.4

A conversation initiated between two users on the same machine:

$ write root pts/7 test

Will show up to the user on that console as:

Message from root@wiki on pts/8 at 11:19 ... test

See also

The Wikibook Guide to Unix has a page on the topic of: Commands

References

  1. write(1) – Version 7 Unix Programmer's Manual http://man.cat-v.org/unix_7th/1/write

  2. Unix Programmer's Manual (PDF) (1st ed.). Bell Labs. 3 November 1971. p. write(1). Archived from the original (PDF) on 9 July 2016. Retrieved 9 July 2016. https://web.archive.org/web/20160709075913/http://www.bell-labs.com/usr/dmr/www/man14.pdf

  3. Fetter, Mirko (2019). New Concepts for Presence and Availability in Ubiquitous and Mobile Computing. University of Bamberg Press. p. 38. ISBN 9783863096236. The basic concept of sending instantaneously messages to logged in users came with ... CTSS ... 9783863096236

  4. write(1) – util-linux man page https://www.mankier.com/1/write