Ubuntu 18.04串口终端开机免密自动登录
ubuntu18.04已经不再使用initd管理系统,改用systemd
serial getty
# vim /lib/systemd/system/serial-getty\@.service
开机设置选项
ExecStart=-/sbin/agetty --autologin root --noclear %I $TERM
[Service]
# The '-o' option value tells agetty to replace 'login' arguments with an
# option to preserve environment (-p), followed by '--' for safety, and then
# the entered username.
ExecStart=-/sbin/agetty --autologin root --noclear %I $TERM
Type=idle
Restart=always
UtmpIdentifier=%I
TTYPath=/dev/%I
TTYReset=yes
TTYVHangup=yes
KillMode=process
IgnoreSIGPIPE=nostem/serial-getty@.service" 46L, 1468C
SendSIGHUP=yes