CentOS shutdown command shutdown reboot halt poweroff

Source: Internet
Author: User

Disable ctrl + alt + del

• By default, ctrl + alt + del is used to restart the system with a delay of 3 seconds. The delay between sending an alarm message to the process and killing the process signal is 3 seconds. • Edit/etc/inittab and set the ctrl + alt + del Function


# TrapCTRL-ALT-DELETE

Ca: ctrlaltdel:/sbin/shutdown-t3-rnow

Ctrlaltdel
The ctrlaltdel command is used to set the combination key ctrl + alt + del.
-Soft: first sends the SIGINT (terminate process) signal to the init process. By
The init process processes shutdown operations (secure ).
-Hard: If sync is not called, immediately restart the system.
Sync: synchronize data in the disk and memory to write data in the buffer zone to the disk. Man sync, info sync


Halt
-N: Shut down the OS, and do not execute sync. Related operations are not written to the log file "/var/log/wtmp ".
-W: the OS is not disabled. Only corresponding records are added to wtmp (logon and exit records.
-D: Disable the OS and do not write records to/var/log/wtmp.
-F: forcibly shut down the system.
-P: Shut down the OS and cut off the power, that is, call poweroff.
-I: Disable all network interfaces before shutting down the system.
-H: Set all hardware in the system to standby mode (standby power-saving mode) before shutting down the system ).
-N after the system administrator uses the fsck command to patch the partition, this method can be used to prevent the kernel from overinstalling the patched super block with the old version of super block.


Poweroff
Turn off the system and automatically turn off the system power.
The shutdown speed is too high.
The parameter uses the same halt (except the-p parameter)
For security, you can use the-h parameter.


Reboot
-N: restart the system. Do not run sync or write/var/log/wtmp.
-W: No restart. Only corresponding records are added to/var/log/wtmp.
-D: restart the system. Do not write/var/log/wtmp.
-F: Force restart without calling shutdown
-I: Close all network interfaces before restarting, so that no network user can log on to the system during system restart.


Shutdown
-K: it does not actually shut down, but only sends a warning message to the login user in the system.
-F: when the system is restarted, the file system check Command (fsck) is not executed)
-F: Run The fsck command to restart the system.
-H: Do not restart after shutdown, halt, poweroff
-R: restart the system.
-N: No init program is called. shutdown is used to complete all shutdown operations. (Not recommended)
-T: the number of seconds after the shutdown operation is delayed.
-C: The user cancels the ongoing shutdown operation, for example, setting a shutdown delay of 1000 seconds.
Before shutting down or restarting the system, you can send notifications to all logged-on users. New logon commands are disabled and shutdown times can be specified.
Shutdown-h HH: MM warning information
The shutdown command sends the SIGTERM (Termination software, process) signal to the init program, and then sends the kill signal. init changes the system operation level to complete related operations.


Linux operating level
Linux running level:
Shut down the system at level 0, equivalent to halt,
Level 1 single-user mode with only one console terminal, which is generally used by the root user for system maintenance,
Level 2 multi-user mode, but no NFS, that is, multi-user mode without Network Services
Level 3 standard operation level, multi-user mode with Network Services
Level 4 undefined
5-level multi-user graphical interface with network and X Window, X11
Level 6 restart, equivalent to reboot.
You can modify the/etc/inittab file to set
The default running level. If it is set to 0 or 6
Interesting things happen!


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.