Inittab Set Default boot mode

Source: Internet
Author: User

Inittab Set Default boot mode

By modifying the/etc/inittab, the system enters different modes at startup.

As below Id:3:initdefault: that line, the number option 3 indicates that the system starts by default into the multiuser text mode, and by modifying the number, the default entry mode is entered. The numeric option value is 0~6.
Attention:
0-Means to shut down the system (do not set the default to 0 oh.) )
1-Single user mode
2-multiuser mode, no NFS service
3-Multi-user text mode
5-Graphics mode
6-System reboot

When you start into multiuser text mode, you can use the command startx to enter graphics mode.

During system use, you can also switch to different working modes through the init command, as follows:
Init 3 (Enter text mode)
Init 5 (Enter graphics mode)
Init 6 (Reboot system)
Init 0 (Shutdown system)

[Lwg@rhel4 ~]$ Cat/etc/inittab
#
# Inittab This file describes how the INIT process should set up
# The system in a certain run-level.
#
# Author:miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
# Modified for RHS Linux by Marc Ewing and Donnie Barnes
#

# Default RunLevel. The runlevels used by RHS are:
# 0-halt (Don't set Initdefault to this)
# 1-single User mode
# 2-multiuser, without NFS (the same as 3, if you don't have networking)
# 3-full Multiuser mode
# 4-unused
# 5-x11
# 6-reboot (Don't set Initdefault to this)
#
Id:3:initdefault:

# System initialization.
Si::sysinit:/etc/rc.d/rc.sysinit

L0:0:WAIT:/ETC/RC.D/RC 0
L1:1:WAIT:/ETC/RC.D/RC 1
L2:2:WAIT:/ETC/RC.D/RC 2
L3:3:WAIT:/ETC/RC.D/RC 3
L4:4:WAIT:/ETC/RC.D/RC 4
L5:5:WAIT:/ETC/RC.D/RC 5
L6:6:WAIT:/ETC/RC.D/RC 6

# Trap Ctrl-alt-delete
Ca::ctrlaltdel:/sbin/shutdown-t3-r now

# When we are UPS tells us Power has failed, assume we have a few minutes
# of Power left. Schedule a shutdown for 2 minutes from now.
# This does, the course, assume you have Powerd installed and your
# UPS connected and working correctly.
PF::p owerfail:/sbin/shutdown-f-H +2 "power failure; System shutting down "

# If Power is restored before the shutdown kicked in, cancel it.
Pr:12345:powerokwait:/sbin/shutdown-c "Power restored; Shutdown cancelled "


# Run Gettys in standard runlevels
1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty Tty2
3:2345:respawn:/sbin/mingetty Tty3
4:2345:respawn:/sbin/mingetty Tty4
5:2345:respawn:/sbin/mingetty Tty5
6:2345:respawn:/sbin/mingetty Tty6

# Run XDm in RunLevel 5
X:5:respawn:/etc/x11/prefdm-nodaemon

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.