嵌入式linux,怎么开机自动登录到console

嵌入式linux,怎么开机自动登录到console,第1张

打开电脑之前,进入界面后。进入命令界面登录到console

基本命令如下:

inittab文件:

JavaScript code

# /etc/inittab: init(8) configuration.

# $Id: inittab,v 1.91 2002/01/25 13:35:21 miquels Exp $

# The default runlevel.

id:5:initdefault:

# Boot-time system configuration/initialization script.

# This is run first except when booting in emergency (-b) mode.

si::sysinit:/etc/init.d/rcS

# What to do in single-user mode.

~~:S:wait:/sbin/sulogin

# /etc/init.d executes the S and K scripts upon change

# of runlevel.

#

# Runlevel 0 is halt.

# Runlevel 1 is single-user.

# Runlevels 2-5 are multi-user.

# Runlevel 6 is reboot.

l0:0:wait:/etc/init.d/rc 0

l1:1:wait:/etc/init.d/rc 1

l2:2:wait:/etc/init.d/rc 2

l3:3:wait:/etc/init.d/rc 3

l4:4:wait:/etc/init.d/rc 4

l5:5:wait:/etc/init.d/rc 5

l6:6:wait:/etc/init.d/rc 6

# Normally not reached, but fallthrough in case of emergency.

z6:6:respawn:/sbin/sulogin

S:2345:respawn:/sbin/getty 115200 ttyO0

# /sbin/getty invocations for the runlevels.

#

# The "id" field MUST be the same as the last

# characters of the device (after "tty").

#

# Format:

# <id>:<runlevels>:<action>:<process>

#

1:2345:respawn:/sbin/getty 38400 tty1

null::wait:sh /etc/init.d/my.sh

你用的是桌面的Linux版本吧?你新建一个脚本,把你查看这些硬件信息的命令写进去。然后再写一个脚本,这个脚本的命令就是运行你之前查看硬件信息的那个脚本,然后把这个脚本拖到你开机进入桌面要运行的那些进程的文件夹里面。


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/8637426.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-19
下一篇 2023-04-19

发表评论

登录后才能评论

评论列表(0条)

保存