IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

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

    mao0514发表于 2017-02-13 09:56:47
    love 0

    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




沪ICP备19023445号-2号
友情链接