嵌入式ubuntu自动登入

root@arm:~# getty --help

Usage:
 getty [options] line baud_rate,... [termtype]
 getty [options] baud_rate,... line [termtype]

Options:
 -8, --8bits                assume 8-bit tty
 -a, --autologin <user>     login the specified user automatically
 -c, --noreset              do not reset control mode
 -f, --issue-file <file>    display issue file
 -h, --flow-control         enable hardware flow control
 -H, --host <hostname>      specify login host
 -i, --noissue              do not display issue file
 -I, --init-string <string> set init string
 -l, --login-program <file> specify login program
 -L, --local-line           force local line
 -m, --extract-baud         extract baud rate during connect
 -n, --skip-login           do not prompt for login
 -o, --login-options <opts> options that are passed to login
 -p, --loginpause           wait for any key before the login
 -R, --hangup               do virtually hangup on the tty
 -s, --keep-baud            try to keep baud rate after break
 -t, --timeout <number>     login process timeout
 -U, --detect-case          detect uppercase terminal
 -w, --wait-cr              wait carriage-return
     --noclear              do not clear the screen before prompt
     --nonewline            do not print a newline before issue
     --no-hostname          no hostname at all will be shown
     --long-hostname        show full qualified hostname
     --version              output version information and exit
     --help                 display this help and exit

编辑/etc/inittab文件,修改getty选项。

# Example how to put a getty on a modem line.
#
#T3:23:respawn:/sbin/mgetty -x0 -s 57600 ttyS3


S0:23:respawn:/sbin/getty -L ttyS0 115200 vt102

 

最后一行修改成如下:

S0:23:respawn:/sbin/getty -a root -L ttyS0 115200 vt102

 

然后我们passwd -d root 删掉root用户密码。

-a表示自动以root用户登入。

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值