Shell


To shut down the system properly, use the appropriate command - at least historically, this has been shutdown and may also be available on systemd based init systems if the systemd-sysv package is installed: shutdown. It notifies all users and processes of the impending shutdown, blocks new logins, and brings the system down cleanly. (Just cutting power to the system without cleanly stopping processes and unmounting filesystems could result in the loss or corruption of data.)

To halt the system once the shutdown is complete, use the -h option; to reboot the system after shutdown, use -r instead.

For systems using the systemd init system, see (also): systemctl - most notably the poweroff and reboot subcommands thereof.

Users of Desktop Environments may have preferable options there, which may cleanly shutdown the Desktop Environment(s), and then perform the relevant shutdown/poweroff/reboot operation.