ubuntu自动登录tty1(shell,text)配置

前端之家收集整理的这篇文章主要介绍了ubuntu自动登录tty1(shell,text)配置前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

1.写脚本autologin

#!/bin/bash
/bin/login -f
#你的用户名

移动到/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

原文链接:https://www.f2er.com/ubuntu/354603.html

猜你在找的Ubuntu相关文章