halt Linux Commands

What is Linux halt Command?

Explanation

halt COMMAND:

halt command is used to shutdown the computer.

SYNTAX :


halt [-d | -f | -h | -n | -i | -p | -w]
reboot [-d | -f | -i | -n | -w]
poweroff [-d | -f | -h | -n | -i | -w]

OPTIONS:


- d Don't write wtmp record(into /var/log/wtmp file). The -n flag implies -d
- h put all harddrives in the system in standby mode before the system is halted or turnedoff
- n Don't sync before reboot or halt
- i shutdown all network interface.
- p While halting the system, also turnoff the system. This is default when halt is called as poweroff.
- w Don't actually reboot or halt but only write wtmp record (into /var/log/wtmp file)

EXAMPLE:


  1. To halt the system:
    halt

    This command is similar to poweroff, which shutdown the system.
  2. To Poweroff the system:
    poweroff

    Poweroff command used for turnoff the system.
  3. To reboot the system:
    reboot

    Reboot command used for reboots/restarts the system.

Ask Questions

Ask Question