Halt command of linux command

  
        

halt

1. Function

The halt command is used to shut down the system and its usage rights are superusers.

2. Format

halt [-n] [-w] [-d] [-f] [-i] [-p]

3. Main parameters Description

-n: Prevents sync system calls. It is used after patching the root partition with fsck to prevent the kernel from overwriting the patched superblock with the old version of the superblock.

-w: It's not really a reboot or shutdown, just write a wtmp (/var/log/wtmp) record.

-f: Did not call shutdown, but forced shutdown or restart.

-i: Turn off all network interfaces before shutting down (or rebooting).

-f: Force shutdown, do not call shutdown command.

-p: When the power is turned off, the power is turned off.

-d: Shut down the system, but leave no records.

4. Command Description

halt is to call shutdown -h.halt execution, kill the application process, execute sync (must write the data stored in the buffer to the hard disk) system call After the file system write operation is completed, the kernel will be stopped. If the system's run level is 0 or 6, shut down the system; otherwise, replace it with the shutdown command (plus the -h parameter).

Copyright © Windows knowledge All Rights Reserved