In centos, tty1 represents a virtual terminal; the console terminal emulates a terminal type of linux, and has some special files associated with the device. These special files are virtual terminals; it can be controlled in Log in on the platform and use the "Alt [F1-F6]" key combination to switch to tty1 to tty6.
The operating environment of this article: centos 7 system, Dell G3 computer.
tty1,, tty2 represents a virtual terminal.
In Linux systems, the computer monitor is usually called the console terminal (Console). It emulates a terminal of type Linux (TERM=Linux), and has some device special files associated with it: tty0, tty1, tty2, etc. When you log in at the console, tty1 is used.
When using the Alt [F1-F6] key combination, we can switch to tty2, tty3, etc. tty1–tty6 and so on are called virtual terminals, and tty0 is an alias of the currently used virtual terminal. Information generated by the system will be sent to the terminal (also called a console terminal at this time).
You can log in to different virtual terminals, so the system can have several different sessions at the same time. Only the system or super user root can write to /dev/tty0
Extended knowledge:
The terminal is a character device, which has many types. tty is often used to refer to various types of terminal devices.
tty is the abbreviation of Teletype. Teletype is one of the earliest terminal devices that appeared, much like a teletypewriter (or ), and was produced by Teletype Company. The device name is placed in the special file directory /dev/. The terminal special device files generally include the following:
Serial port terminal (/dev/ttySn)
Pseudo terminal (/dev/pty/)
Control terminal (/dev/tty)
Console terminal (/dev/ttyn, /dev/console)
Recommended tutorial: "centos tutorial"
The above is the detailed content of What is tty1 in centos system. For more information, please follow other related articles on the PHP Chinese website!