Modify the Linux default startup level or mode

  
        There are 7 startup levels in Linux: #0 - halt (Do NOT set initdefault to this)# 1 - Single user mode# 2 - Multiuser, without NFS (The same as 3, if you do not have networking) # 3 - Full multiuser mode# 4 - unused# 5 - X11# 6 - reboot (Do NOT set initdefault to this) Detailed explanation of each run level: 0 is the stop and the machine is turned off. That is, immediately after powering off, it is turned off again in single-user mode, just like the security mode under Win9x. 2 is multi-user mode, but there is no NFS support. 3 is the full multi-user mode and is the standard run level. 4 Generally not used, in some special cases you can use it to do something. For example, when the laptop's battery is exhausted, you can switch to this mode to make some settings. 5 is X11, and entered the X Window System. 6 In order to restart, running the init 6 machine will restart. 0 and 6 are generally not used;

Run startx to boot to level 5.

Modify startup items:

Enter Linux as an administrator, modify the file: /etc/inittab Find “id:5:initdefault:”, where 5 is X-Window, For the default run level, generally we change 5 to 3.

Modify the wrong configuration method:

If you accidentally set the level to 0 or 6, use the following method to remedy:

Boot into the startup interface

Within 8 seconds, press Enter. The following interface appears

Then enter e


Enter single at the end of the second line with a space. The specific method is to move to the second line by pointing downwards, press “e” enter edit mode


Add single carriage back


Finally press “b” to start, enter the single-user mode after booting


Enter single-user mode and edit the /etc/inittab with vi to locate id:X:initdefault, modify For the mode you want to choose. Just reboot.

Copyright © Windows knowledge All Rights Reserved