Every login shell that is open has a UNIX device file that is associated with it. This file handles all IO for the terminal and is called a “tty”.
One can find what tty he is working on by using the tty command.
2 terminals on a network will have 2 different ttys, and users can chat/talk/write to each other using the write command
write target_username target_tty
For instance I create 2 terminals (tabs)
U1: terminal 1 has tty: /dev/pts/0
U2: terminal 2 has tty: /dev/pts/6
U1$ write U2 /dev/pts/6 U2$ Message from U1 on /dev/pts/0
$ write U1 /dev/pts/0
$ Message from U2 on /dev/pts/6 Hi!
Use the EOF (Ctrl+D) to exit chat