How to power off a Debian Linux box via console
You need to be root (or use sudo
):
# This halts (shuts down) the computer now
sudo shutdown -h now
# This reboots the computer now
sudo shutdown -r now
Read the manual page for shutdown: man shutdown
for more information.
In the link you gave, you just overlooked the sentence
simply run as root:
You need to be root (or use sudo):
To shutdow the pc use:
systemctl poweroff
To restart the pc use:
systemctl reboot