System Run Levels


  • At bootup, init reads /etc/inittab file and executes all scripts for default run level.
    On Unix, there are 7 conventional run levels (0,1,2,3,4,5,6). However, 10 levels are possible (0 -- 9).

  • On Debian,
    
    Runlevel  0  - is halt.
    Runlevel  1  - is single-user.
    Runlevels 2-5  are multi-user.
    Runlevel  6  - is reboot.
    

  • On the other Linux systems, such as RedHat,
    
    Runlevel  0 - halt 
    Runlevel  1 - Single user mode
    Runlevel  2 - Multiuser, without NFS (The same as 3, if you do not have networking)
    Runlevel  3 - Full multiuser mode
    Runlevel  4 - unused
    Runlevel  5 - X11
    Runlevel  6 - reboot 
    

    File /etc/inittab specifues what init should do at startup.
    
    # The default runlevel (2 in this  case).
    id:2:initdefault:
    
    Entries in /etc/inittab take the following format:
    
    id:run-level:action:process
    
    id: a unique identifier
    run-level: 0 -- 6
    action: sysinit - run process at bootup
    once - run process once upon entering specific runlevel
    respawn - restart process whenever it is terminated
    wait - like "once", but awaits completion of process before continuing

    Previous Pageprevious First Pagetop Next Pagenext