您的位置:首页 > 运维架构 > Shell

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

2017-02-13 09:56 477 查看
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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: