Breaking News
Loading...
Monday, August 5, 2013

Runlevels on Centos/Redhat/Fedora

12:59 PM

1. Introduction

Runlevels define what services or processes should be running on the system. The Linux operating system can make use of runlevels through the programs of the sysvinit project. After the Linux kernel has booted, the init program reads the /etc/inittab file to determine the behavior for each runlevel. Unless the user specifies another value as a kernel boot parameter, the system will attempt to enter (start) the default runlevels.

2.Runlevels on RedHat, Centos and Fedora have 6 levels:

Runlevel 0: Halt System - To shutdown the system
Runlevel 1: Single user mode
Runlevel 2: Basic multi user mode without NFS
Runlevel 3: Full multi user mode (text based)
Runlevel 4: unused
Runlevel 5: Multi user mode with Graphical User Interface
Runlevel 6: Reboot System

3.Change Runlevels

Use the init command to change run levels:
init <level>
On most Linux server default run level 3 and on most Linux desktop default run level 5 with GUI. The default run level is defined in /etc/inittab file. You can change default run level by edit /etc/inittab file.
vi /etc/inittab
The following line at the top line of inittab file
id:3:initdefault:
Change default run level from 3 to 5:
id:5:initdefault:

0 comments:

Post a Comment

 
Toggle Footer