2019年10月21日 星期一

How to create /dev/tty0

Create tty0~tty15
CONFIG_VT=y
Create ttyS0
CONFIG_SERIAL_CONSOLE=y


enable ttyS0 with systemctl (test on Debian Jessie)
# systemctl enable serial-getty@ttyS0.service
It will create the link file in /etc/systemd/system/getty.target.wants
ex: 
# ls /etc/systemd/system/getty.target.wants
  serial-getty@ttyS0.service -> /lib/systemd/system/serial-getty@.service


# systemctl mask serial-getty@ttyS0.service
It will link to /dev/null in /etc/systemd/system/
ex: 
# ls /etc/systemd/system/serial-getty@ttyS0.service -> /dev/null


# systemctl disable serial-getty@ttyS0.service
It will remove the file in /etc/systemd/system/getty.target.wants
ref:
1. Here
2. stackoverflow
3. Pid Eins

沒有留言:

張貼留言