Write (Unix) Explained

write
Author:Dennis Ritchie,
Ken Thompson
Developer:AT&T Bell Laboratories
Operating System:Unix and Unix-like
Platform:Cross-platform
Genre:Command

In Unix and Unix-like operating systems, is a utility used to send messages to another user by writing a message directly to another user's TTY.

History

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

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.[3]

A conversation initiated between two users on the same machine:$ write root pts/7test

Will show up to the user on that console as:Message from root@wiki on pts/8 at 11:19 ...test

See also

Notes and References

  1. Book: Unix Programmer's Manual. 3 November 1971. Bell Labs. write(1). 1st. 9 July 2016. https://web.archive.org/web/20160709075913/http://www.bell-labs.com/usr/dmr/www/man14.pdf. 9 July 2016.
  2. Book: Fetter, Mirko . 2019 . New Concepts for Presence and Availability in Ubiquitous and Mobile Computing . University of Bamberg Press . 38 . 9783863096236 . The basic concept of sending instantaneously messages to logged in users came with ... CTSS ....
  3. https://www.mankier.com/1/write write(1) – util-linux man page