FAQ: terminal and console

Source: Internet
Author: User

Reproduced from: http://blog.cliffwoo.com /? P = 8

Wu Jin (cliffwoo@gmail.com)
Footoo opensource lab

Since many of my friends have never been very clear about the concepts of terminals, I wrote this FAQ to help you understand these concepts. If this is not the case, please send a letter to us.

Q: What is/dev/console?

A:/dev/console refers to the console, which is a device that interacts with the operating system. The system directly outputs some information to the console. Currently, users can log on to the console only in single-user mode.


Q: What is/dev/tty?

A: tty devices include virtual consoles, serial ports, and Pseudo Terminal devices. /Dev/tty indicates the current tty device. Enter
Echo "Hello">/dev/tty will be directly displayed on the current terminal.


Q: What is/dev/TTYs?

A:/dev/TTYs * is a serial terminal device. & Lt;/font>

Q: What is/dev/Pty? </Font>

A:/dev/Pty * is a Pseudo Terminal. The so-called Pseudo Terminal is a logical terminal device and is mostly used to simulate terminal programs. For example, we open a terminal in X Window and log on to the Linux host using telnet or SSH in windows, the Pty device is used at this time (to be precise, the Pty slave device should be used ). <
/Font>

Q:/dev/tty0 and/dev/tty1... What is/dev/tty63? What are the differences between them? </Font>

A:/dev/tty0 indicates the current virtual console, while/dev/tty1 indicates the first virtual console. For example, when Alt + F2 is used for switching, the system's virtual console is/dev/tty2, and the current console points to/dev/tty2

Q: How do I determine the current terminal (or console )? & Lt;/font>

A: Use the TTY command to determine the current terminal or console.

Q: Is/dev/console a symbolic link to/dev/tty0? & Lt;/font>

A: most of the current texts refer to/dev/console as a link to/dev/tty0 (including "Linux kernel source code Scenario Analysis"), but this is inaccurate. According to the kernel documentation, before version 2.1.71,/dev/console can be linked to/dev/tty0 or other tty * based on different system settings. After version 2.1.71, it is completely controlled by the kernel. Currently, you can log on to/dev/console only in single-user mode (you can enter the TTY command in single-user mode for confirmation ).

Q: What is the difference between/dev/tty0 and/dev/FB? </Font>

A: You can use/dev/tty0 to access the video card in a system not enabled by the framebuffer device.

Q: What are the differences between terminals and the console? </font>

A: You can refer to the "terminal devices" section in documents of the kernel. In addition, section 8.7 of Linux kernel source code Scenario Analysis
And section 3.9 in operating systems: design and implementation (section 3rd in version 3.8) provides a good introduction to the concepts and history of terminal devices. In addition, the introduction to terminal devices is also introduced in modern operating system. The text content is roughly the same as that of operating systems: design and implementation. Operating
Systems: design and implementation divides terminal devices into three categories, while modern operating system classifies terminal hardware devices into two categories. The difference is that the former uses X terminal as a category.

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.