On Linux system, there are a lot of commands to shutdown and reboot your system.
This tutorial aims to detail some existing possibilities.

init

The init_ command interact on the __run level system and announce to each process that the system will restart or shutdown and log this action.

#Restart
init 6

#Shutdown
init 0

shutdown

The shutdown command has the same effect as init with the following additional elements :

  • warning users of the current action with a display on their terminal,
  • forbid new connections to the system,
  • program the execution of the command,
  • report to processes of extinction with a SIGTERM signal.
#Restart (reboot)
shutdown -r

#Shutdown now(halt)
shutdown -h now

#Shutdown at 10:15 / Shutdown in 60 minutes
shutdown -h 10:15
shutdown -h +60

poweroff

The poweroff command is also useful since it allows direct shutdown without the shutdown command actions, which is equivalent to a halt -p:

#Alimentation's shutdown
poweroff
halt -p

Vote