Both people log on to a Linux host or open two session windows at the same time, as follows:
[Email protected] ~]# W
02:00:59 up, 7:15, 3 users, Load average:0.00, 0.00, 0.00
USER TTY from [email protected] IDLE jcpu PCPU
Root pts/0 192.168.204.98 00:27 31:52 0.03s 0.00s VI 123/
Root pts/1 192.168.204.50 00:50 0.00s 0.01s 0.00s W
Root pts/2 192.168.204.50 01:59 52.00s 0.06s 0.06s-bash
At Terminal A, enter the following:
echo "Hello, what is you doing?" >/DEV/PTS/1
The B terminal is displayed as follows:
Hello, what is you doing?
Enter the following in the B terminal:
echo "Hi I am working." >/DEV/PTS/2
The A terminal is displayed as follows:
[Email protected] ~]# echo "Hello, what is you doing?" >/DEV/PTS/1
[Email protected] ~]# hi I am working.
This article is from the "Youth Deng Yong" blog, please be sure to keep this source http://dengyong.blog.51cto.com/8409869/1433666