gpt4 book ai didi

linux - `/dev/ttyS0` 和 `/dev/ttys0` 之间的区别?

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:13:07 35 4
gpt4 key购买 nike

在Linux中,/dev/ttyS0/dev/ttys0有什么区别?

我知道第一个是串行端口,但第二个是什么,带有小的 s

最佳答案

see this

For a pseudo terminal pair such as ptyp3 and ttyp3, the pty... is the master or controlling terminal and the tty... is the slave. There are only 16 ttyp's: ttyp0-ttypf (f is a hexadecimal digit). To get more pairs, the 3 letters q, r, s may be used instead of p. For example the pair ttys8, ptys8 is a pseudo terminal pair. The master and slave are really the same "port" but the slave is used by the application program and the master is used by a network program (or the like) which supplies (and gets) data to/from the slave port.

关于linux - `/dev/ttyS0` 和 `/dev/ttys0` 之间的区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22106/

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com