Write (Unix)

Unix command to send messages to another user by writing directly to their terminal

This article is about the Unix command. For the system call, see write (system call).

This article relies excessively on references to primary sources. Please improve this article by adding secondary or tertiary sources.
Find sources: "Write" Unix – news · newspapers · books · scholar · JSTOR (August 2016) (Learn how and when to remove this message)

|

write

Original author(s)| Dennis Ritchie,
Ken Thompson
Developer(s)| AT&T Bell Laboratories
Initial release| November 3, 1971; 53 years ago (1971-11-03)
Operating system| Unix and Unix-like
Platform| Cross-platform
Type| Command

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

## History

[edit]

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

[edit]

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

[edit]

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

* List of Unix commands
* talk (Unix)
* wall (Unix)

## References

[edit]

1. ^ `write(1)` – Version 7 Unix Programmer's Manual
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.
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 ..."
4. ^ write(1) – util-linux man page

* v
* t
* e

Unix command-line interface programs and shell builtins

File system|

* cat
* chattr
* chmod
* chown
* chgrp
* cksum
* cmp
* cp
* dd
* du
* df
* file
* fuser
* ln
* ls
* mkdir
* mv
* pax
* pwd
* rm
* rmdir
* split
* tee
* touch
* type
* umask

Processes|

* at
* bg
* crontab
* fg
* kill
* nice
* ps
* time

User environment|

* env
* exit
* logname
* mesg
* talk
* tput
* uname
* who
* write

Text processing|

* awk
* basename
* comm
* csplit
* cut
* diff
* dirname
* ed
* ex
* fold
* head
* iconv
* join
* m4
* more
* nl
* paste
* patch
* printf
* read
* sed
* sort
* strings
* tail
* tr
* troff
* uniq
* vi
* wc
* xargs

Shell builtins|

* alias
* cd
* echo
* test
* unset
* wait

Searching|

* find
* grep

Documentation|

* man

Software development|

* ar
* ctags
* lex
* make
* nm
* strip
* yacc

Miscellaneous|

* bc
* cal
* expr
* lp
* od
* sleep
* true and false

* Categories
* Standard Unix programs
* Unix SUS2008 utilities
* List

*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template