Linux init command - switch system runlevel

init command: switch system runlevel

init command Function Description

The init command toggles the system runlevel. init defines seven runlevels, where init 0 is used to shutdown and init 6 is used to restart the computer.

init command Syntax

init [Option]

Option Meaning

The meaning of each option in the command is shown below.

Option Description
–verbose Output detailed emission information about job status changes and events to the system console or log

init command Demo

Shutting down the computer system

[root@deepinout ~]# init 0   //Switching to runlevel 0 is equivalent to shutting down the system

Rebooting the computer system

[root@deepinout ~]# init 6   //Switching to runlevel 6 is equivalent to rebooting the system

What exactly is the runtime level?

Simply say, the runlevel is the level of functionality that the operating system is currently running at.

This level ranges from 0 to 6 and has different functions. You can also see the English description of it in /etc/inittab.

#0  Shutdown (never set initdefault to 0)
#1  Single User Mode
#2  Multi-user moe, no NFS (similar to level 3, which stops some services)
#3  Full multi-user mode
#4  Not used
#5  x11(Xwindow)
#6  Reboot (never set initdefault to 6)
Like(0)
Linux Login Logout Command
Linux login commandLinux logout commandLinux nologin commandLinux exit commandLinux sulogin commandLinux rlogin commandLinux poweroff commandLinux ctrlaltdel CommandLinux shutdown commandLinux halt commandLinux reboot commandLinux init commandLinux runlevel commandLinux telinit command
Linux File Management Command
Linux cat commandLinux tac commandLinux nl commandLinux more commandLinux less commandLinux head commandLinux tail commandLinux rev commandLinux fold commandLinux fmt commandLinux expand commandLinux pr commandLinux sort commandLinux uniq commandLinux cut commandLinux comm commandLinux diff commandLinux join commandLinux diff3 commandLinux cmp commandLinux colrm commandLinux paste commandLinux mkdir commandLinux tr commandLinux split commandLinux csplit commandLinux tee commandLinux unexpand commandLinux patch commandLinux awk commandLinux sed commandLinux od commandLinux pwd commandLinux cd commandLinux ls commandLinux dir commandLinux dirs commandLinux touch commandLinux rmdir commandLinux cp commandLinux mv commandLinux rm commandLinux install commandLinux tmpwatch commandLinux file commandLinux du commandLinux wc commandLinux tree commandLinux cksum commandLinux md5sum commandLinux sum commandLinux dirname commandLinux mkfifo Command
Cron Expressions
Cron Expression to Run Every Day at 12 PMUnderstanding Vue Cron ExpressionsUnderstanding JS Cron ExpressionsA Comprehensive Guide to Cron Expressions for Scheduled TasksUnderstanding Linux Cron ExpressionsUnderstanding Quartz Cron ExpressionsCron ExpressionCron Time ExpressionCron Expression ParsingCron Expression: Executing a Task Every SecondCron Expression for Every Minute ExecutionCron Expression to Execute Every 10 MinutesCron Expression: Executing Every HourCron Expression to Execute Once a YearCron Expression: How to Schedule a Task to Run Daily at Midnight?