2021年6月12日 星期六

Linux systemd console autologin

編輯 /usr/lib/systemd/system/getty@.service
把原來的 ExecStart 改成
ExecStart=-/sbin/agetty -a root %I $TERM
-a 表示 autologin
若不想要用 root ,可改用其他 user

單行設定指令
sed -i 's/ExecStart.*/ExecStart=-\/sbin\/agetty -a root %I \$TERM/' /usr/lib/systemd/system/getty@.service

沒有留言:

Fix Unable to detect release version (use '--releasever' to specify release version)

rpm -ivh https://mirror01.idc.hinet.net/CentOS/8-stream/BaseOS/x86_64/os/Packages/centos-gpg-keys-8-6.el8.noarch.rpm rpm -ivh https://mirror...