Runlevels on linux OS presents major differences on how your linux box will boot up and behave. Runlevels on linux changes a variety of execution patterns on loading up INIT process, environment, kernel modules, applications and services when booting up a linux box.
In Linux, runlevels are represented by /etc/inittab text file. The default runlevel is always specified from /etc/inittab text file.
Currently there are several runlevels that exist and being supported by linux boxes. Here are the most currently used runlevels :
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Runlevels Descriptions
0 - halt
1 - Single user mode
2 - Multiuser, without NFS (The same as 3, if you do not have networking)
3 - Full multiuser mode (terminal mode)
4 - unused
5 - X11 (X mode)
6 - reboot
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The most commonly used runlevels in a currently running linux box are 3 and 5. You can change runlevels in many ways.
A runlevel of 5 will take you to GUI enabled login prompt interface and desktop operations. Normally by default installation, this would take your to GNOME or KDE linux environment. A runlevel of 3 would boot your linux box to terminal mode (non-X) linux box and drop you to a terminal login prompt. Runlevels 0 and 6 are runlevels for halting or rebooting your linux respectively.
Here are a quick run down on how to change runlevels in several ways:
How to change the default runlevel?
-----------------------------------
To change the default runlevel in fedora ,edit /etc/inittab and find the line that looks like this:
id:5:initdefault:
The number 5 represents a runlevel with X enabled (GNOME/KDE mostly). If you want to change to runlevel 3, simply change this
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
id:5:initdefault:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
to this
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
id:3:initdefault:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Save and reboot your linux box. Your linux box would now reboot on runlevel 3, a runlevel without X or GUI. Avoid changing the default /etc/iniittab runlevel value to 0 or 6 .
How to change runlevel during bootup time?
------------------------------------------
When currently booting, press any key to take you to GRUB boot menu. Choose your desired kernel version and press 'e' to edit or modify the kernel argument. Simply append the runlevel you wish to boot up from. If you wish to boot to runlevel 3, simple append 3 from the last kernel argument separated by a space, press enter when done. Now press 'b' to continue and boot from your saved or modified kernel parameters. This would take you to the changed runlevel you have just specified.
How to change your current runlevel or on-the-fly runlevel?
-----------------------------------------------------------
If you wish to change from runlevel 5 to runlevel 3, simply issue as root
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# telinit 3
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Special runlevels can also be specified by telinit.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Runlevels Description
a,b,c process only those /etc/inittab file entries having runlevel a,b or c.
Q or q re-examine the /etc/inittab file.
S or s switch to single user mode.
U or u re-execute itself. No re-examining of /etc/inittab file happens.
7- 9 undocumented and reserved
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you wish to see more telinit argument, man telinit. Be careful with /etc/inittab file when changing your default runlevel.
Subscription
Categories
- HowTos (612)
- Linux Devices (40)
- Linux Diggs (620)
- Linux News (1541)
- Linux Videos (24)
Recent Posts
Blog Archive
-
▼
2007
(340)
-
▼
November
(39)
- HowTo: Strip directory path and filename suffix
- HowTo: Get the Filename Extension Only
- Tailf - watch the linux log file grows
- Fedora 8 with Enlightenment Window Manager
- HowTo: ScreenCasts & Desktop Records via Istanbul
- HowTo: Record Desktop Session via Byzanz
- Linux Scorched 3D Tank Game
- Linux Atomic Battle Tank Game
- HowTo: Display a Tree of Linux Processes
- Howto: 3 Easy Install Steps of Microsoft Fonts in ...
- Howto: Convert PDF to HTML/XML/PNG in Linux
- Livna Repository on Fedora 8
- Linux Action Flight Simulator Game
- Splitting and Merging Multiple Linux Files
- Sort Nth Position of Nth Column of a File in Linux
- Stop, Pause, and Continue A Linux Process
- File Creation without File Opening in Linux
- Concatenate Multiple Files in Linux
- Renaming Files in Linux
- Linux Power Consumption Analysis Tool
- Tail and Head Few Lines of Text Files
- Three Easy Steps for Opera on Fedora 8
- Alternative Search and Replace Tool
- Display Lines Beginning with a Given String
- Spell Check Files via Terminal - Install Howto
- Display Linux Session Jobs
- Get Linux Disk Space and Usage
- Change Linux RunLevels Howto
- Audacious - Install Howto
- Amarok - Howto Install
- Sun Java on Fedora 8 Install HowTo
- My Fedora 8 Diary
- Chikka on Kopete Messenger Howto
- Linux Files and Folders Local Copying
- Linux folders and directories recursive removal
- MailX - Mail Facility via Terminal
- Time zone values interpretation
- Retrieving Linux Standard Base and Distro Information
- Fedora Firstboot
-
▼
November
(39)
Monday, November 19, 2007
Change Linux RunLevels Howto
Subscribe to:
Post Comments (Atom)
ILoveTux - howtos and news | About | Contact | TOS | Policy
0 comments:
Post a Comment