리눅스 Run Level 변경 ( init )

Posted by Blozk
2015.06.29 15:49 LINUX




Linux Run Level


    RunLevel 0 : 시스템 종료(halt)

    RunLevel 1 : 단일 사용자, 싱글 모드

    RunLevel 2 : NFS를 지원하지 않는 다중 사용자 모드

    RunLevel 3 : 모든 기능을 포함한 다중 사용자 모드(X윈도우 지원안함)

    RunLevel 4 : 사용되지 않는 실행모드(사용자가 직접정의하여 사용)

    RunLevel 5 : X윈도우 부팅, GUI환경

    RunLevel 6 : 시스템 재부팅



RunLevel 변경 ex) init 3 으로 변경


    [root@yybox /]# init 3



부팅시 적용


[root@yybox /]# vi /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 (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)

#

id:3:initdefault:  <<  id값을 변경한다.


# 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 our 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, of course, assume you have powerd installed and your

# UPS connected and working correctly.

pf::powerfail:/sbin/shutdown -f -h +2 "Power Failure; System Shutting Down"


이 댓글을 비밀 댓글로