1、串行端口终端(/dev/ttySn):

串行端口终端(Serial Port Terminal)是使用计算机串行端口连接的终端设备。计算机把每个串行端口都看作是一个字符设备。有段时间这些串行端口设备通常被称为终端设备,因为那时它的最大用途就是用来连接终端。这些串行端口所对应的设备名称是/dev/tts/0(或/dev/ttyS0), /dev/tts/1(或/dev/ttyS1)等,设备号分别是(4,0), (4,1)等,分别对应于DOS系统下的COM1、COM2等。若要向一个端口发送数据,可以在命令行上把标准输出重定向到这些特殊文件名上即可。

2、伪终端(/dev/pty):

所谓伪终端是逻辑上的终端设备,多用于模拟终端程序。例如我们在Windows使用telnet或ssh等方式登录Linux主机,此时均在使用pty设备。

pty即Pseudo-TTY 伪终端或者叫做虚拟终端。是成对的逻辑终端设备(即master和slave设备, 对master的操作会反映到slave上)。

pts是Pseudo Terminal Slave的缩写。是pty的实现方法,与ptmx(pseudo-terminal master)配合使用实现pty。当我们telnet到主机,或者直接使用xterm,或者程序需要交互时,我们就需要一个终端。因为只有通过终端我们才能实现人与计算机的交互。只要是人与计算机的交互,就一定是使用的虚拟终端pty(pseudo-tty)。

[pirate@localhost ~]$ ll /dev/pts/*

crw--w----. 1 pirate tty  136, 0 Oct 13 08:14 /dev/pts/0

crw--w----. 1 pirate tty  136, 1 Oct 13 08:14 /dev/pts/1

crw--w----. 1 pirate tty  136, 3 Oct 12 15:50 /dev/pts/3

c---------. 1 root   root   5, 2 Oct 12 11:12 /dev/pts/ptmx

[pirate@localhost ~]$ tty      #xshell中查看当前pts

/dev/pts/1

[pirate@localhost ~]$ tty      #xwindow中查看当前pts

/dev/pts/0

3、控制台终端/物理终端( /dev/console)

在Linux 系统中,计算机显示器通常被称为控制台终端(Console)。

4、虚拟终端(/dev/tty# [#为1-6])

tty一词源于Teletypes,或teletypewriters,原来指的是电传打字机,是通过串行线用打印机键盘通过阅读和发送信息的东西,后来这东西被键盘和显示器取代,所以现在叫终端比较合适。终端是一种字符型设备,他有多种类型,通常使用tty来简称各种类型的终端设备。

切换方式为Ctrl+Alt+F[1-6]。

[pirate@localhost ~]$ ll /dev/tty*

crw-rw-rw-. 1 root   tty     5,  0 Oct 12 11:12 /dev/tty

crw--w----. 1 root   tty     4,  0 Oct 12 11:12 /dev/tty0

crw--w----. 1 root   tty     4,  1 Oct 12 11:12 /dev/tty1

crw--w----. 1 root   tty     4, 10 Oct 12 11:12 /dev/tty10

crw--w----. 1 root   tty     4, 11 Oct 12 11:12 /dev/tty11

crw--w----. 1 root   tty     4, 12 Oct 12 11:12 /dev/tty12

crw--w----. 1 root   tty     4, 13 Oct 12 11:12 /dev/tty13

crw--w----. 1 root   tty     4, 14 Oct 12 11:12 /dev/tty14

crw--w----. 1 root   tty     4, 15 Oct 12 11:12 /dev/tty15

crw--w----. 1 root   tty     4, 16 Oct 12 11:12 /dev/tty16

crw--w----. 1 root   tty     4, 17 Oct 12 11:12 /dev/tty17

crw--w----. 1 root   tty     4, 18 Oct 12 11:12 /dev/tty18

crw--w----. 1 root   tty     4, 19 Oct 12 11:12 /dev/tty19

crw--w----. 1 pirate tty     4,  2 Oct 12 15:50 /dev/tty2

crw--w----. 1 root   tty     4, 20 Oct 12 11:12 /dev/tty20

crw--w----. 1 root   tty     4, 21 Oct 12 11:12 /dev/tty21

crw--w----. 1 root   tty     4, 22 Oct 12 11:12 /dev/tty22

crw--w----. 1 root   tty     4, 23 Oct 12 11:12 /dev/tty23

crw--w----. 1 root   tty     4, 24 Oct 12 11:12 /dev/tty24

crw--w----. 1 root   tty     4, 25 Oct 12 11:12 /dev/tty25

crw--w----. 1 root   tty     4, 26 Oct 12 11:12 /dev/tty26

crw--w----. 1 root   tty     4, 27 Oct 12 11:12 /dev/tty27

crw--w----. 1 root   tty     4, 28 Oct 12 11:12 /dev/tty28

crw--w----. 1 root   tty     4, 29 Oct 12 11:12 /dev/tty29

crw--w----. 1 root   tty     4,  3 Oct 12 11:12 /dev/tty3

crw--w----. 1 root   tty     4, 30 Oct 12 11:12 /dev/tty30

crw--w----. 1 root   tty     4, 31 Oct 12 11:12 /dev/tty31

crw--w----. 1 root   tty     4, 32 Oct 12 11:12 /dev/tty32

crw--w----. 1 root   tty     4, 33 Oct 12 11:12 /dev/tty33

crw--w----. 1 root   tty     4, 34 Oct 12 11:12 /dev/tty34

crw--w----. 1 root   tty     4, 35 Oct 12 11:12 /dev/tty35

crw--w----. 1 root   tty     4, 36 Oct 12 11:12 /dev/tty36

crw--w----. 1 root   tty     4, 37 Oct 12 11:12 /dev/tty37

crw--w----. 1 root   tty     4, 38 Oct 12 11:12 /dev/tty38

crw--w----. 1 root   tty     4, 39 Oct 12 11:12 /dev/tty39

crw--w----. 1 root   tty     4,  4 Oct 12 11:12 /dev/tty4

crw--w----. 1 root   tty     4, 40 Oct 12 11:12 /dev/tty40

crw--w----. 1 root   tty     4, 41 Oct 12 11:12 /dev/tty41

crw--w----. 1 root   tty     4, 42 Oct 12 11:12 /dev/tty42

crw--w----. 1 root   tty     4, 43 Oct 12 11:12 /dev/tty43

crw--w----. 1 root   tty     4, 44 Oct 12 11:12 /dev/tty44

crw--w----. 1 root   tty     4, 45 Oct 12 11:12 /dev/tty45

crw--w----. 1 root   tty     4, 46 Oct 12 11:12 /dev/tty46

crw--w----. 1 root   tty     4, 47 Oct 12 11:12 /dev/tty47

crw--w----. 1 root   tty     4, 48 Oct 12 11:12 /dev/tty48

crw--w----. 1 root   tty     4, 49 Oct 12 11:12 /dev/tty49

crw--w----. 1 root   tty     4,  5 Oct 12 11:12 /dev/tty5

crw--w----. 1 root   tty     4, 50 Oct 12 11:12 /dev/tty50

crw--w----. 1 root   tty     4, 51 Oct 12 11:12 /dev/tty51

crw--w----. 1 root   tty     4, 52 Oct 12 11:12 /dev/tty52

crw--w----. 1 root   tty     4, 53 Oct 12 11:12 /dev/tty53

crw--w----. 1 root   tty     4, 54 Oct 12 11:12 /dev/tty54

crw--w----. 1 root   tty     4, 55 Oct 12 11:12 /dev/tty55

crw--w----. 1 root   tty     4, 56 Oct 12 11:12 /dev/tty56

crw--w----. 1 root   tty     4, 57 Oct 12 11:12 /dev/tty57

crw--w----. 1 root   tty     4, 58 Oct 12 11:12 /dev/tty58

crw--w----. 1 root   tty     4, 59 Oct 12 11:12 /dev/tty59

crw--w----. 1 root   tty     4,  6 Oct 12 11:12 /dev/tty6

crw--w----. 1 root   tty     4, 60 Oct 12 11:12 /dev/tty60

crw--w----. 1 root   tty     4, 61 Oct 12 11:12 /dev/tty61

crw--w----. 1 root   tty     4, 62 Oct 12 11:12 /dev/tty62

crw--w----. 1 root   tty     4, 63 Oct 12 11:12 /dev/tty63

crw--w----. 1 root   tty     4,  7 Oct 12 11:12 /dev/tty7

crw--w----. 1 root   tty     4,  8 Oct 12 11:12 /dev/tty8

crw--w----. 1 root   tty     4,  9 Oct 12 11:12 /dev/tty9

crw-rw----. 1 root   dialout 4, 64 Oct 12 11:12 /dev/ttyS0

crw-rw----. 1 root   dialout 4, 65 Oct 12 11:12 /dev/ttyS1

crw-rw----. 1 root   dialout 4, 66 Oct 12 11:12 /dev/ttyS2

crw-rw----. 1 root   dialout 4, 67 Oct 12 11:12 /dev/ttyS3

[pirate@localhost ~]$ tty    #查看当前tty

/dev/tty3

原创文章,作者:wangshuai,如若转载,请注明出处:http://www.178linux.com/50913

终端类型 xterm linux,Linux的终端类型相关推荐

  1. linux里怎么看终端类型,如何区分Linux下的几种终端类型:tty、pty和pts

    如何区分Linux下的几种终端类型:tty.pty和pts 基本概念: 1. tty(终端设备的统称): tty一词源于teletypes,或者teletypewriters,原来指的是电传打字机,是 ...

  2. linux telnet成功显示什么_一文带你彻底理解 Linux 的各种终端类型及概念

    (给Linux爱好者加星标,提升Linux技能) 转自:dog250 https://blog.csdn.net/dog250/article/details/78766716 每天使用Linux每天 ...

  3. Linux的各种终端类型及概念

    每天使用Linux每天都要接触到Bash,使用Bash时似乎永远都让人摸不着头脑的概念就是终端,坐在这台运行着Linux的机器的显示器前面,这个显示器就是终端的输出,而插在机器上的USB键盘或者PS/ ...

  4. Linux系统下,虚拟终端开启256色_虚拟终端类型xterm开启256色

    文章目录 查看当前终端类型 修改终端类型 查看当前终端类型 现在的终端模拟器早就支持256色了,不过默认可能还是8色的. 开启终端,查看终端类型: [root@htlwk0001host ~]# ec ...

  5. linux终端的背景_如何在终端显示图像缩略图 | Linux 中国

    lsix 是一个简单的命令行实用程序,旨在使用 Sixel 图形格式在终端中显示缩略图.-- Sk 不久前,我们讨论了 Fim[1],这是一个轻量级的命令行图像查看器应用程序,用于从命令行显示各种类型 ...

  6. Linux中的终端、控制台、tty、pty等概念

    基本概念: 1>tty(终端设备的统称): tty一词源于Teletypes,或者teletypewriters,原来指的是电传打字机,是通过串行线用打印机键盘通过阅读和发送信息的东西,后来这东 ...

  7. Linux终端一直输出login,Linux tty pty console区别

    基本概念: 1. tty(终端设备的统称): tty一词源于Teletypes,或者teletypewriters,原来指的是电传打字机,是通过串行线用打印机键盘通过阅读和发送信息的东西,后来这东西被 ...

  8. Linux中的终端(Terminal)与控制台(Console)的区别

    前言:我们经常听见两个概念,终端和控制台,但是它们的本质到底是什么,到底有什么区别,却很少能够讲得清楚,虽然明确的区分它们并没有太大的用处,但是对于理解Linux还是非常有帮助的. 一.终端Termi ...

  9. linux(ubuntu)~终端(terminal)shell操作指令

    shell是指计算机操作指令,是用户.计算机程序.内核之间沟通的桥梁,是计算机图形化之前操作计算机的方式,现在包含:sh-shell.bash-shell.csh-shell.tcsh-shell.a ...

最新文章

  1. ORM表之间的多对多处理
  2. 学神!手握7篇Nature的他,今天再发Science!
  3. 差分隐私 机器学习_满足差分隐私的经验误差最小化方法
  4. 使用BusyBox制作根文件系统的操作步骤
  5. 【GPU编程】The Cg Runtime:OpenGL中调用Cg程序
  6. 荣耀X20 SE评测:6400万高清美拍 2000元以下真香现场
  7. 《TCP/IP详解卷1》学习小结(一)------链接层
  8. 「leetcode」486. 预测赢家:【三种递归+动态规划】由浅入深,步步到位
  9. Win10系统重装方法 简单实现一键重装win10系统
  10. 有道云笔记同步出错后,如何排查原因
  11. 【S0002】插画大师Laura欧美儿童插画临摹图集363张
  12. 传统行业如何在互联网时代转型
  13. 还在用Evernote或印象笔记吗?来看看笔记神器Notion吧!
  14. vs怎么配置c语言codemac,在Mac上使用vs-code快速上手c语言学习(入门文,老鸟退散)...
  15. 梅科尔工作室苏慎臻,Django使用ORM增删改
  16. NDIS和Rndis区别
  17. 【MATLAB】矩阵元素及其基本运算
  18. 通过socks 代理 攻击局域网的电脑
  19. 使用scrollTo、scrollBy、Scroller实现滚动动画
  20. Hello!我的大学生活学习指南

热门文章

  1. 加速linux开机速度 systemctl
  2. C#如何判断某个日期是否为今天
  3. lisp语言cond和if套用_LISP语言入门(CLISP)
  4. 论文阅读利器——划词翻译插件(桌面与浏览器)
  5. Python 真的好学吗?
  6. ISCSI linux/windows配置及使用
  7. 学会提问——批判性思维指南
  8. Project中最常用的注意点
  9. FGUI+Laya Air 游戏架构之stage分层架构
  10. 自步对比学习(Self-paced Contrastive Learning with Hybrid Memory for Domain Adaptive Object Re-ID)