Changing Run Level of Linux in CentOS

During the boot process for RHEL and CentOS systems the init command opens the /etc/inittab file to decide what "runlevel" the system should be booted to. The /etc/inittab file is a plain text file that can be opened with your favorite text editor.

01. Login as a root

02. Locate the following system file "inittab" (Initialization Table Tab)

03. Places --> Search for File --> Give a file name and select a looking folder for root

04. To edit the system file double click

This tells the init process that the default run level for the system is run level 5. To change to a different run level simply change the number and save the /etc/inittab file. Before doing this, however, be absolutely sure you know which run level you want. Selecting the wrong run level can have serious consequences. To help with this a detailed description of the individual run levels is outlined below:
Run Levels

0. Run Leve 0 (Halt) - Shutdown for Machine
1. Run Level 01 (Single User Mode) - Risque mode/ safe mode for Linux for trouble shooting
2. Run Level 02 (Multi User, Without NFS) - Only booting to the CLI, Multiple users can logging but no networking services.
3. Run Level 03 (Full Multi User Mode) - Only booting to the CLI, Multiple users can logging, but with enable all Networking services
4. Run Level 04 (Unused) - Custom run level for system developers, Currently unused.
5. Run Level 05 (X11) - Booting to the GUI anybody can logging with all network services enable
6. Run Level 06(Reboot) - Reboot for Machine

05. Change Run Level
id:3:initdefault:

06. Save and exit your file and reboot your system

07. After changing the run level, How to go to GUI
[root@daddylinux~]#startx

08. Manually change desktop with CLI
From Gnome to KDE - #switchdesk kde
You can Check - #startx

From KDE to Gnome - #switchdesk gnome
You can Check - #startx

2 comments: