1.写脚本autologin
代码:
#!/bin/bash
/bin/login -f <username> #你的用户名
/bin/login -f <username> #你的用户名
移动到/usr/bin/下,并且用chmod +x autologin设置可执行权限
2.修改/etc/init/tty1.conf
修改前:
# tty1 - getty
#
# This service maintains a getty on tty1 from the point the system is
# started until it is shut down again.
start on stopped rc RUNLEVEL=[2345]
stop on runlevel [!2345]
respawn
exec /sbin/getty -8 38400 tty1
修改后:
# tty1 - getty
#
# This service maintains a getty on tty1 from the point the system is
# started until it is shut down again.
start on stopped rc RUNLEVEL=[2345]
stop on runlevel [!2345]
respawn
exec /sbin/getty -n -l /usr/bin/autologin -8 38400 tty1
相关热门文章
给主人留下些什么吧!~~
评论热议
本文介绍了如何在Ubuntu系统中实现TTY1终端的自动登录Shell。首先,需要创建一个脚本并放置在/usr/bin/目录下,赋予执行权限。然后,编辑/etc/init/tty1.conf文件进行相关设置,以完成自动登录。
1万+

被折叠的 条评论
为什么被折叠?



