美文网首页
linux设置自动登录 字符终端[debian ubuntu s

linux设置自动登录 字符终端[debian ubuntu s

作者: skkily | 来源:发表于2023-01-27 14:44 被阅读0次

适用于使用systemd启动的文件系统, debian ubuntu等

  • 编辑此文件 /etc/systemd/system/getty.target.wants/getty@tty1.service
    • 或者是/etc/systemd/system/getty@tty1.service.d/autologin.conf
  • 更改ExecStart=-/sbin/agetty -o '-p -f -- \\u' --noclear --autologin username %I $TERM
    • 与原文件对比, 增加了-f --autologin username这三个字段, 其中username换成你的用户名, 如root

参考链接:
https://wiki.archlinux.org/title/getty

相关文章

网友评论

      本文标题:linux设置自动登录 字符终端[debian ubuntu s

      本文链接:https://www.haomeiwen.com/subject/ehsehdtx.html