LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-08-2013, 12:52 PM   #1
Senthilv
Member
 
Registered: Jan 2011
Posts: 66
Blog Entries: 2

Rep: Reputation: 0
Can any one tell what is default run level in Linux


Hai All,


I just want to known what is the default run level in linux?
 
Old 06-08-2013, 01:12 PM   #2
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
There are two: run level 3 is the text console, run level 4 is the default for a GUI log in window.

Here's a list of the run levels in Slackware (from /etc/inittab), they should be comparable on other distributions:
Code:
#   0 = halt
#   1 = single user mode
#   2 = unused (but configured the same as runlevel 3)
#   3 = multiuser mode (default Slackware runlevel)
#   4 = X11 with KDM/GDM/XDM (session managers)
#   5 = unused (but configured the same as runlevel 3)
#   6 = reboot
Hope this helps some.
 
Old 06-08-2013, 01:51 PM   #3
Timothy Miller
Moderator
 
Registered: Feb 2003
Location: Arizona, USA
Distribution: Debian, EndeavourOS, OpenSUSE, KDE Neon
Posts: 4,003
Blog Entries: 26

Rep: Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521
And then the Red Hat levels are:

Code:
0 — Halt
1 — Single-user text mode
2 — Not used (user-definable)
3 — Full multi-user text mode
4 — Not used (user-definable)
5 — Full multi-user graphical mode (with an X-based login screen)
6 — Reboot
Every system has the default runlevel set by the admin, so it can change from system to system. I use 4 (slackware-type) or 5 (Red Hat-type) most often except on my old server (RIP), which used 3.

Last edited by Timothy Miller; 06-08-2013 at 01:52 PM.
 
1 members found this post helpful.
Old 06-08-2013, 02:02 PM   #4
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Debian is different again (this may apply to Ubuntu and Mint also, but I don't know for sure).
Code:
# Runlevel 0 is halt.
# Runlevel 1 is single-user.
# Runlevels 2-5 are multi-user.
# Runlevel 6 is reboot.
 
1 members found this post helpful.
Old 06-08-2013, 02:25 PM   #5
Timothy Miller
Moderator
 
Registered: Feb 2003
Location: Arizona, USA
Distribution: Debian, EndeavourOS, OpenSUSE, KDE Neon
Posts: 4,003
Blog Entries: 26

Rep: Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521
Yeah, while I love Debian, their runlevels seem absolutely arbitrary...
 
Old 06-08-2013, 02:34 PM   #6
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Quote:
Originally Posted by Timothy Miller View Post
Yeah, while I love Debian, their runlevels seem absolutely arbitrary...
You're telling me. I hate to admit but I'd not checked the runlevels in Debian before, since I always boot into a GUI, so I hadn't realised how arbitrary they were.
 
Old 06-08-2013, 06:22 PM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,119

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Can I perhaps toss systemd into the discussion ....

Runlevels are probably destined to become moot - even for Debian.
 
Old 06-08-2013, 09:19 PM   #8
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by Senthilv View Post
Hai All,


I just want to known what is the default run level in linux?
in Linux what?
http://en.wikipedia.org/wiki/Telinit#Default_runlevels
 
Old 06-08-2013, 09:42 PM   #9
Senthilv
Member
 
Registered: Jan 2011
Posts: 66

Original Poster
Blog Entries: 2

Rep: Reputation: 0
Thanks MR.Habitual
 
Old 06-09-2013, 01:12 AM   #10
Z038
Member
 
Registered: Jan 2006
Location: Dallas
Distribution: Slackware
Posts: 910

Rep: Reputation: 174Reputation: 174
Quote:
Originally Posted by syg00 View Post
Can I perhaps toss systemd into the discussion ....

Runlevels are probably destined to become moot - even for Debian.
In systemd, do you know how one specifies whether to boot to single user text mode, multiuser text mode, or graphical session manager mode?
 
Old 06-09-2013, 03:01 AM   #11
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,119

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Systemd uses targets - some Fedora doco here.

As usual, the Arch wiki also has some good doco.
 
Old 06-09-2013, 09:25 AM   #12
Z038
Member
 
Registered: Jan 2006
Location: Dallas
Distribution: Slackware
Posts: 910

Rep: Reputation: 174Reputation: 174
Thanks, syg00. systemd sounds complex, but intriguing. I may have to install Fedora on one of my systems just to see how it works.
 
Old 06-09-2013, 01:15 PM   #13
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
Quote:
Originally Posted by Timothy Miller View Post
Yeah, while I love Debian, their runlevels seem absolutely arbitrary...
Runlevels are arbitrary. IIRC there are several live distros using several more levels for several other flavors of the running environment. It is just a matter of configuration and configuration have been enumerated.

However, for the sake of uniformity it would have been better if a de facto standard had evolved in the course of time. I remember switching from RH to Debian as a newbie and heck I could not understand why Debian would not show X runlevel 5.

jlinkels
 
Old 06-09-2013, 09:28 PM   #14
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,349

Rep: Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750
@OP: just to emphasise/extend tronayne's comment, /etc/inittab lists all the available runlevels, what they mean and what the the current default is; see last line
Code:
# Default runlevel. The runlevels used 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:5:initdefault:
 
Old 06-09-2013, 11:12 PM   #15
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,119

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Or, you may see something like this ...
Quote:
# inittab is no longer used when using systemd.
As always, Linux is about choice - doesn't pay to presume too much.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
initializing run level 4 at inittab default level Gerwar Linux - General 3 01-17-2011 04:38 PM
set your default run level so you will boot to a default run level - vga console Adam555 Linux - Newbie 1 01-21-2008 04:55 PM
Default Run Level custangro Solaris / OpenSolaris 4 05-01-2007 11:31 PM
Why Run Level 2 by Default? aquaboot Ubuntu 4 08-24-2005 07:50 PM
Setting default run level blacktempest07 Linux - Newbie 2 03-03-2004 12:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration