runlevel.8 2.32 KB
Newer Older
1
'\" t
2
.TH "RUNLEVEL" "8" "" "systemd 215" "runlevel"
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
runlevel \- Print previous and current SysV runlevel
.SH "SYNOPSIS"
.HP \w'\fBrunlevel\ \fR\fB[options...]\fR\ 'u
\fBrunlevel \fR\fB[options...]\fR
.SH "DESCRIPTION"
.PP
\fBrunlevel\fR
prints the previous and current SysV runlevel if they are known\&.
.PP
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\&.
.PP
Unless overridden in the environment, this will check the utmp database for recent runlevel changes\&.
.SH "OPTIONS"
.PP
The following option is understood:
.PP
\fB\-\-help\fR
.RS 4
41
Print a short help text and exit\&.
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
.RE
.SH "EXIT STATUS"
.PP
If one or both runlevels could be determined, 0 is returned, a non\-zero failure code otherwise\&.
.SH "ENVIRONMENT"
.PP
\fI$RUNLEVEL\fR
.RS 4
If
\fI$RUNLEVEL\fR
is set,
\fBrunlevel\fR
will print this value as current runlevel and ignore utmp\&.
.RE
.PP
\fI$PREVLEVEL\fR
.RS 4
If
\fI$PREVLEVEL\fR
is set,
\fBrunlevel\fR
will print this value as previous runlevel and ignore utmp\&.
.RE
.SH "FILES"
.PP
/var/run/utmp
.RS 4
The utmp database
\fBrunlevel\fR
reads the previous and current runlevel from\&.
.RE
.SH "NOTES"
.PP
This is a legacy command available for compatibility only\&. It should not be used anymore, as the concept of runlevels is obsolete\&.
.SH "SEE ALSO"
.PP
\fBsystemd\fR(1),
\fBsystemctl\fR(1)