Geeky chat

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.

$ tty

/dev/pts/0

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

Hey… Hey…


$ write U1 /dev/pts/0

$ Message from U2 on /dev/pts/6 Hi!

Hi

Use the EOF (Ctrl+D) to exit chat

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: