Chat (session) under Linux Terminal

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.