centos7 /dev/tty /dev/console /dev/ttyx

  1. /dev/tty 表明当前tty,包括伪终端pts
  2. /dev/tty0和 /dev/console表明当前tty,不包括伪终端
  3. 用echo测试验证 如echo "test" > /dev/console

参考:
http://www.javashuo.com/article/p-gpmliqit-bh.html
https://unix.stackexchange.com/questions/60641/linux-difference-between-dev-console-dev-tty-and-dev-tty0html

相关文章
相关标签/搜索