There are shutdown, halt, reboot, and init under Linux to shut down and restart the system. For them, their internal working process is different.
Another year passed,In 2010, maybe Microsoft grabbed the halo of Linux last year.It's not easy.In fact, Linux is getting hotter,Many computer users have linux installed. For those Linux beginners, this article introduces the Linux shutdown and restart commands in detail for you.For you to play a certain role in learning the Linux shutdown command.
Use it to safely shut down the system,However, when shutting down the system,Will notify all logged in users that the system is about to shut down,And all instructions will be frozen,That is, all new users can no longer log in,Using this command will cause immediate shutdown or restart and a delay of shutdown or restart.(Note:this command is only available to superusers)
Command syntax format:
shutdown [options] [time] [warning message]
The meaning of the options in this command:
-k:just issue a warning message to the user
-r:restart system after shutdown
-h:do not restart the system after shutdown
-f:quickly shut down the system,But the disk test is not performed when the system is restarted (the system is entered into the bios interface during the experiment, but no operation can be performed)
-n:quickly shut down the system,But not closed by init program
-c:Interrupt to shut down the system (no specific how to experiment)
Using the halt command is to call the "shutdown -h" command to perform a system shutdown
Command syntax format;
-w:not really shut down the system,Just write "wtmp" (/var/log/wtmp) records
-d:do not write "wtmp"
-f:force shutdown without calling "shutdown"
-i:Before shutting down the system or restarting the system,Close all network uo interfaces
-p:This option is the default option,"Power off" is called when the system is shut down
The reboot command works similarly to the halt command.But reboot is causing the host to restart.All its parameters are similar to "halt".
4, init command
The above is all the narratives we can share for you to easily grasp the Linux shutdown and restart commands.Hope you like it.
The init command uses the system's runlevel control system.It is the ancestor of all system processes,Its process number is always 1, so sending a "term" signal to init will terminate all user processes, daemons, etc."Shutdown" uses this mechanism.init 0 is to shut down the system,init 1 is to restart the system.
- Linux (Ubuntu) hibernate, suspend, standby, shutdown commands detailed introduction
- Detailed Linux shutdown command summary
- Implementation of the specified script function when Linux is shut down
- Detailed shutdown and restart commands in Linux
- Linux uses the init command to shutdown, restart, and switch modes
- Implementation method of Linux low power automatic shutdown
- python - you may need to restart the kernel to use updated packages error
- php - coincheck api authentication doesn't work
- php - i would like to introduce the coincheck api so that i can make payments with bitcoin on my ec site
- [php] i want to get account information using coincheck api
- the emulator process for avd pixel_2_api_29 was killed occurred when the android studio emulator was started, so i would like to
- python 3x - typeerror: 'method' object is not subscriptable
- i want to call a child component method from a parent in vuejs
- xcode - pod install [!] no `podfile 'found in the project directory
- dart - flutter: the instance member'stars' can't be accessed in an initializer error