ubuntu自动登录tty1(shell,text)配置
1.編寫登錄腳本-autologin:
#!/bin/bash
/bin/login -f <username> #你的用戶名
將autologin文件移到到/usr/bin/下,并且用chmod +x autologin設(shè)置可執(zhí)行權(quán)限
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
重啟系統(tǒng)后,則系統(tǒng)會(huì)默認(rèn)用設(shè)置好的用戶自動(dòng)登錄
?
轉(zhuǎn)載于:https://www.cnblogs.com/web424/p/7356301.html
總結(jié)
以上是生活随笔為你收集整理的ubuntu自动登录tty1(shell,text)配置的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 移动端手机适配
- 下一篇: ubuntu18.04安装pycharm