Linux Terminal Simple Summary notes!

Source: Internet
Author: User

Theory:

Usually the console that we see under Linux is done by several devices. The/dev/ttyn (where Tty0 is/dev/console,tty1,tty2 is a different Virtual Console). A hotkey ALT+FN is typically used to switch between these virtual terminals.

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M00/86/F2/wKiom1fPhMiAUPxTAABd5cQ5hAo449.png-wh_500x0-wm_3 -wmp_4-s_4196086937.png "title=" 4.png "alt=" Wkiom1fphmiaupxtaabd5cq5hao449.png-wh_50 "/>

Control Terminal:

/dev/tty

Refers to the current terminal, the output to this content will only be displayed on the current working terminal display, if the current process has a control terminal (controlling Terminal), then/dev/tty is the current Process Control terminal device special files.


Console terminal/dev/ttyn N (0 to 6) Tty1,tty2 is a different virtual terminal (Vsan).

eg

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/86/F2/wKiom1fPgECRRZX6AAAseqcUf2Y141.png-wh_500x0-wm_3 -wmp_4-s_1531984200.png "title=" 1.png "alt=" Wkiom1fpgecrrzx6aaaseqcuf2y141.png-wh_50 "/>

Dev/console is Tty0, Tty0 is the current use of virtual terminal is an active virtual terminal alias, the information generated by the system will be sent to the terminal, in fact, the machine has only one screen, that is, we see this screen, It can be understood that the console points to the active TTY, which is exactly the active TTY to display the output to the console. Historically, the console refers to the on-screen keyboard of the host itself, while TTY refers to the console of other locations where the cable is linked (with only screens and keyboards). Tty0 is automatically opened by the system, but is not used for user logon.

Eg: enter single user mode

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M00/86/F2/wKiom1fPgqSSmaPqAAAz655sFcc005.png-wh_500x0-wm_3 -wmp_4-s_2273000282.png "title=" 1.png "alt=" Wkiom1fpgqssmapqaaaz655sfcc005.png-wh_50 "/>

Pseudo Terminal

/dev/pts is the directory where the console device files are created after remote login (TELNET,SSH, etc.)

eg

TTY View

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/86/F2/wKiom1fPfZHxjlVkAABNtyfkrWI783.png-wh_500x0-wm_3 -wmp_4-s_2344159313.png "title=" 1.png "alt=" Wkiom1fpfzhxjlvkaabntyfkrwi783.png-wh_50 "/>

Serial port terminal (/DEV/TTYSN)

The serial port terminal (Serial Port Terminal) is a terminal device connected using a computer serial port. The computer sees each serial port as a character device. For a while these serial port devices are often referred to as end-device, because it is used to connect the terminal at that time.

The serial port corresponding to the device name is/dev/tts/0 (or/DEV/TTYS0),/DEV/TTS/1 (or/dev/ttys1), etc., the device number is (4,0), (4,1), respectively, corresponding to the DOS system COM1, COM2 and so on. To send data to a port, you can redirect standard output to these special file names on the command line.

[Email protected] ~]# Ll/dev/tty

TTY Tty11 tty15 tty19 tty22 tty26 tty3 tty33 tty37 tty40 tty44 tty48 tty51 tty55 tty59 tty62 tty9 TTY S3

Tty0 tty12 tty16 tty2 tty23 tty27 tty30 tty34 tty38 tty41 tty45 tty49 tty52 tty56 tty6 tty63 ttyS0

Tty1 tty13 tty17 tty20 tty24 tty28 tty31 tty35 tty39 tty42 tty46 tty5 tty53 tty57 tty60 tty7 ttyS1

Tty10 tty14 tty18 tty21 tty25 tty29 tty32 tty36 tty4 tty43 tty47 tty50 tty54 tty58 tty61 tty8 ttyS2

[Email protected] ~]# Ll/dev/ttys

TtyS0 ttyS1 ttyS2 ttyS3

[Email protected] ~]# Ll/dev/ttys


This article from the "[email protected]" blog, declined to reprint!

Linux Terminal Simple Summary notes!

Related Article

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.