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

相關文章
相關標籤/搜索