In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-05-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "how to use shutdown of Linux". In daily operation, I believe many people have doubts about how to use shutdown of Linux. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "how to use shutdown of Linux". Next, please follow the editor to study!
1. Function
The shutdown instruction can close all programs and restart or shut down according to the needs of the user.
When using the shutdown command, you can notify all logins that the system is going to shut down before the system shuts down. At this point, the login instruction will be frozen and new users will no longer be able to log in. This is the recommended safe shutdown method. Before shutting down, all processes will receive the shutdown process signal sent by the shutdown instruction, and then send a signal to the init program asking it to change the running level (runlevel).
The Linux system has 7 runlevels:
Runlevel 0: the system is down. The default runlevel of the system cannot be set to 0, otherwise it cannot start normally.
Runlevel 1: single user working status, root permissions, for system maintenance, no remote login
Runlevel 2: multi-user status (no NFS)
Runlevel 3: full multi-user state (with NFS), enter console command line mode after login
Runlevel 4: system not in use, reserved
Run-level 5:X11 console, log in and enter graphical GUI mode
Runlevel 6: the system shuts down and restarts normally, and the default runlevel cannot be set to 6, otherwise it cannot start normally.
two。 Command format
Shutdown [options] [parameters]
3. Option description-ccancel, other users can cancel the currently executing shutdown program, or Control-C terminates the shutdown program-k only sends a warning message to each logged-in user, but does not really shut down-f does not execute the fsck file system check command on restart;-F executes the fsck file system check command on restart -h shutdown (halt) or power shutdown (poweroff), which depends on the shutdown script of the system (sometimes can be changed in BIOS)-H shutdown (halt);-P shutdown is equivalent to the poweroff command-n does not call the init program to shut down, but by shutdown to restart-r. Equivalent to the reboot command-how many seconds is the delay between sending a warning message and deleting a message-- help display help message-- version display version 4. Common examples
(1) shut down the computer immediately, where now equals to a state of zero time.
Shutdown-H now// or halt
(2) the system is switched off at 20:25 today.
Shutdown-H 20:25
(3) restart the system immediately.
Shutdown-r now// or reboot
(4) send the following warning message, and the system will restart automatically in 30 minutes.
Shutdown-r + 30 'The system will reboot'
(5) the system will not shut down if only a warning is issued.
Shutdown-k now 'This is just a warning message'
(6) turn off the machine immediately and cut off the power supply.
Shutdown-P now// or poweroff
(7) prank, just give a warning, nothing will happen.
Shutdown + 10-k'10 minutes after shutdown'5. FAQ
(1) the difference between shutdown-h, shutdown-H and shutdown-P?
Shutdown-H is a shutdown operation that stops the system, but does not turn off the power.
Shutdown-P is a power off operation.
Shutdown-h chooses whether to power off or not according to the default settings of the system. Turning off the power will send an ACPI instruction to notify the PSU (Power Supply Unit) power supply.
(2) the default operation of shutdown enters single-user maintenance mode.
/ / enter single-user maintenance mode after ten minutes
Shutdown + 10 at this point, the study on "how to use Linux's shutdown" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.