Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

runlevel(8) [debian man page]

RUNLEVEL(8)						Linux System Administrator's Manual					       RUNLEVEL(8)

runlevel -- find the previous and current system runlevel. SYNOPSIS
runlevel [utmp] DESCRIPTION
Runlevel reads the system utmp file (typically /var/run/utmp) to locate the runlevel record, and then prints the previous and current sys- tem runlevel on its standard output, separated by a single space. If there is no previous system runlevel, the letter N will be printed instead. If no utmp file exists, or if no runlevel record can be found, runlevel prints the word unknown and exits with an error. Runlevel can be used in rc scripts as a substitute for the System-V who -r command. However, in newer versions of init(8) this information is also available in the environment variables RUNLEVEL and PREVLEVEL. OPTIONS
utmp The name of the utmp file to read. SEE ALSO
init(8), utmp(5) AUTHOR
Miquel van Smoorenburg, May 27, 1997 RUNLEVEL(8)

Check Out this Related Man Page

RUNLEVEL(8)                                                          runlevel                                                          RUNLEVEL(8)

runlevel - Print previous and current SysV runlevel SYNOPSIS
runlevel [options...] OVERVIEW
"Runlevels" are an obsolete way to start and stop groups of services used in SysV init. systemd provides a compatibility layer that maps runlevels to targets, and associated binaries like runlevel. Nevertheless, only one runlevel can be "active" at a given time, while systemd can activate multiple targets concurrently, so the mapping to runlevels is confusing and only approximate. Runlevels should not be used in new code, and are mostly useful as a shorthand way to refer the matching systemd targets in kernel boot parameters. Table 1. Mapping between runlevels and systemd targets +---------+-------------------+ |Runlevel | Target | +---------+-------------------+ |0 | | +---------+-------------------+ |1 | | +---------+-------------------+ |2, 3, 4 | | +---------+-------------------+ |5 | | +---------+-------------------+ |6 | | +---------+-------------------+ DESCRIPTION
runlevel prints the previous and current SysV runlevel if they are known. The two runlevel characters are separated by a single space character. If a runlevel cannot be determined, N is printed instead. If neither can be determined, the word "unknown" is printed. Unless overridden in the environment, this will check the utmp database for recent runlevel changes. OPTIONS
The following option is understood: --help Print a short help text and exit. EXIT STATUS
If one or both runlevels could be determined, 0 is returned, a non-zero failure code otherwise. ENVIRONMENT
$RUNLEVEL If $RUNLEVEL is set, runlevel will print this value as current runlevel and ignore utmp. $PREVLEVEL If $PREVLEVEL is set, runlevel will print this value as previous runlevel and ignore utmp. FILES
/run/utmp The utmp database runlevel reads the previous and current runlevel from. SEE ALSO
systemd(1),, systemctl(1) systemd 237 RUNLEVEL(8)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

a world of suse linux problems

1) how do i disable the graphic login in suse linux? 2) how do i disable the graphic boot-up in suse linux? 3) how do i disable the graphic console in suse linux? i think disabling graphic console will disable graphic booting, but what do i know, eh? 4) where is the dhcpcd directory and... (2 Replies)
Discussion started by: nydel
2 Replies

2. UNIX for Dummies Questions & Answers

auto startup of a program

how do i make a program run at system startup? is there a hirarchy i have to consider? is there any equivalent to an NT "Service" in unix? how do you set it up? thanx Ron (2 Replies)
Discussion started by: exoron
2 Replies

3. UNIX for Dummies Questions & Answers

X windows problems

I have finaly got my toshiba 4600 to operate in full screen when running x. I am running mandrake 8.0 xfree86 4.0.3. I have the xf86config file modified to use a vesa driver instead of the actually trident driver. The problem that I have now is that If Start in init level 5 the screen just... (7 Replies)
Discussion started by: gennaro
7 Replies

4. UNIX for Dummies Questions & Answers

file feed one line per argument

What tools can I use to accomplish this? I'm writing a shell script to analyze an inittab file. Here's a sample file: init:3:initdefault: ioin::sysinit:/sbin/ioinitrc >/dev/console 2>&1 tape::sysinit:/sbin/mtinit > /dev/console 2>&1 muxi::sysinit:/sbin/dasetup </dev/console >/dev/console... (10 Replies)
Discussion started by: jpprial
10 Replies

5. UNIX for Dummies Questions & Answers

file sysstem size problem

Hi.. i am using HPUX ..and my /usr and /var file sytem has got full... now i want to increase this file system size. so what i have to do.. 1st i have to go to init 1(single user mode) umount the LV increase the size of LV then extendfs then mount the File system and reboot to... (6 Replies)
Discussion started by: Prafulla
6 Replies

6. UNIX for Dummies Questions & Answers

Runlevel in Freebsd?

Hello, Is there any runlevels in freebsd? Like in linux or solaris? Thanks -I (2 Replies)
Discussion started by: Insomniac
2 Replies

7. Linux

runlevel from cmdline or lilo?

Hi, Is it possible to specify runlevel from bootloader command line? I would like to override settings from /etc/inittab without changing it. Thanks (2 Replies)
Discussion started by: odys
2 Replies

8. Linux


Can some exsplain to to me what runlevel 1-9 do? I need to know. (5 Replies)
Discussion started by: Irish Jimmy
5 Replies

9. UNIX for Advanced & Expert Users

Multiple runlevel options at Bootup

Is it possible to give multiple runlevel options during boot up.. When the Welcome screen appears, i want to give multiple runlevel options.. So the user can boot into any desired runlevel he wants.. Found this kinda interesting.. Any hints and solutions please? (2 Replies)
Discussion started by: srikumar_cs
2 Replies

10. SuSE

New runlevel service

Ok, I am attempting to add a new program to startup during the runlevel 3. I am using Suse 10. I made a script lets call it foostart and placed it in /etc/init.d. It has 777 permissions on the script. I then created a link ln -s /etc/init.d/foostart /etc/init.d/rc3.d/S99foostart But during... (9 Replies)
Discussion started by: benefactr
9 Replies

11. UNIX for Dummies Questions & Answers

Runlevels in Unix..

Hello All, I'm a new user to HP-Unix, Aix, Solaris. I know something about Linux. I would like to know, how many run levels are there in Unix, Aix & Solaris? As far as Linux is concerned, there are 7 run levels (0-6). Can some body help me in this, with the brief... (5 Replies)
Discussion started by: Amol21
5 Replies

12. Solaris

Queries related to runlevels and fdisk utility...

Hello friends.. I have 2 doubts as follows: 1.What is the difference between init s (single user mode), init S (single user mode), init 1 (single user mode), and again failsafe mode. As far as I have seen, init s and init 1 does the same thing: putting the system in maintenance mode asking for... (2 Replies)
Discussion started by: saagar
2 Replies

13. Solaris

Query related to runlevels and milestones

Hi friends.. Please clarify my follg doubts: 1. I can easily switch from runlevel 1 to runlevel 2 or 3 by means of init 2 or init 3 commands. I can even get a gui login screen when i do an init 3 from runlevel1. 2.But suppose if I am in GUI and switched to single-user milestone by means of ... (3 Replies)
Discussion started by: saagar
3 Replies

14. Solaris

runlevel issue

hi all i am using solaris 10 with run level 3.(Graphical Interface). I am a beginner to solaris so that i just want to do some R&D with my machine. I decided to boot into the command line interface, so i go througth the internet and find that the following command should be given to boot into the... (8 Replies)
Discussion started by: kingston
8 Replies

15. Solaris

Solaris 10 - Run Level Modification

Hello, I'm creating a VM Image of Solaris 10 on VM Player. I've completed the installation & I am using the Java Desktop as my default logon. I need to modify the Run Level to Console Mode (permanently). Unlike previous versions or Linux, modifying inittab file is not an option here. Please... (2 Replies)
Discussion started by: DevendraG
2 Replies

Featured Tech Videos