unable to shutdown / reboot my Debian 10 server

The trick on how to fix this inconvenience is to explicitly tell the su to set environment variable as if the user logs in directly. This is can be done by the use of - switch.

$ su -

Debian 10 has now fully switched to Systemd which means that the traditional commands to halt or reboot a system like 'shutdown -h now' or 'reboot' will not work anymore


Starting with Debian 10, you should use the commands systemctl poweroff or systemctl reboot.

Edit: It appears the above source was partially incorrect, you can still log in as root (see answer by Eugene) to run the old commands. If you don't want to log in as root, use systemctl.


As 'root' -> 'systemctl poweroff' or 'systemctl reboot'