LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-27-2005, 05:36 PM   #1
bluethundr
Member
 
Registered: Jun 2003
Location: Summit, NJ
Distribution: CentOS 5.4
Posts: 124

Rep: Reputation: 15
Runlevel?


Hi there,

I was wondering if there was a simple command line tool that would let you know what runlevel you were in at the moment other than looking by hand in /etc/inittab?

I am running Debian 'Sarge'

Thanks!
 
Old 09-27-2005, 05:46 PM   #2
berbae
Member
 
Registered: Jul 2005
Location: France
Distribution: Arch Linux
Posts: 540

Rep: Reputation: Disabled
Code:
grep runlevel /var/log/boot.msg
See the last 'Entering runlevel'
 
Old 09-27-2005, 06:57 PM   #3
uopjohnson
Member
 
Registered: Jun 2004
Location: San Francisco
Distribution: Slackware, Ubuntu, RHEL, OS X
Posts: 159

Rep: Reputation: 30
Code:
/sbin/runlevel
gives this on slack.
 
Old 09-27-2005, 07:00 PM   #4
clb
Member
 
Registered: Sep 2004
Location: UK
Distribution: Ubuntu
Posts: 117

Rep: Reputation: 16
/sbin/runlevel also works on FC 4.
 
Old 09-28-2005, 05:30 AM   #5
berbae
Member
 
Registered: Jul 2005
Location: France
Distribution: Arch Linux
Posts: 540

Rep: Reputation: Disabled
/sbin/runlevel
it works also on SuSE

I did not know it.
 
Old 09-28-2005, 05:51 AM   #6
SkyEye
Member
 
Registered: Sep 2005
Location: Sri Lanka
Distribution: Fedora (workstations), CentOS (servers), Arch, Mint, Ubuntu, and a few more.
Posts: 441

Rep: Reputation: 40
Should work in Debian too.

Default in Sarge is runlevel 2.
 
Old 09-29-2005, 04:38 AM   #7
amitsharma_26
Member
 
Registered: Sep 2005
Location: New delhi
Distribution: RHEL 3.0/4.0
Posts: 777

Rep: Reputation: 31
/sbin/runlevel

works on RHEL 4 also.
 
Old 09-29-2005, 06:27 AM   #8
blindcoder
ROCK Linux
 
Registered: Dec 2003
Location: Berlin, Germany
Distribution: Crystal ROCK
Posts: 108

Rep: Reputation: 15
/sbin/runlevel is part of the sysvinit package and thus should be with all distributions using this or a compatible init system.
 
  


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
What's the difference between runlevel 2 and runlevel 5 in Debian? davidas Linux - Newbie 2 01-05-2012 02:10 PM
runlevel eaglegst Linux - Software 1 02-23-2004 01:54 AM
Runlevel 5 lapthorn Linux - Newbie 6 12-03-2003 06:23 AM
X does not start in Runlevel 4, but i Runlevel 3 Rabon Linux - General 3 11-18-2003 07:24 AM
which runlevel? adme Linux - Software 8 02-11-2003 12:05 PM


All times are GMT -5. The time now is 05:30 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration