Linux console and pts-general Linux technology-Linux programming and kernel information. The following is a detailed description. Generally, the console we see in linux is completed by several devices. They are/dev/ttyN (where tty0 is/dev/console, tty1, and tty2 are different virtual terminals (virtual console )). generally, the hot key alt + Fn is used to switch between these virtual terminals. All these tty devices are mapped by linux/drivers/char/console. c and vt. c.
/Dev/pts is the directory of the console device files created after remote login (telnet, ssh, etc. Because thousands of users may log on,/dev/pts is actually dynamically generated, unlike the hard disk nodes generated when other device files are built into the system (if devfs is not used)
The first user logs on to the console. The device file of the console is/dev/pts/0, the second is/dev/pts/1, and so on. Here 0, 1, 2, and 3 are not specific standard inputs or outputs, but the entire console. You can try echo "aaaaaa">/dev/pts0, 1, 2 .......
/Dev/tty refers to the current terminal. The output content is only displayed on the current working terminal display.
/Dev/console is tty0
/Dev/pts is the directory of the console device files created after remote login (telnet, ssh, etc.)
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