This short tutorial shows two ways to shutdown or reboot your Debian 10 server or desktop using the terminal.
Using the shutdown command
Open a terminal and run the following command to shutdown the machine,
This will turn off the machine. If you want to cancel, you must use the -c switch along with the shutdown command.
Likewise, when you need to reboot, run the following command. If you want to undo the action, use the –reboot parameter.
Using the systemctl command
An alternative to the shutdown command is to use the systemd systemctl command.
Shutting down Debian 10 using systemctl:
Rebooting Debian 10 with systemctl:
How to shutdown or restart Debian 10