to Shutdown my Raspberry I type sudo shutdown -h -P now this works fine when I am directly contected via USB Keyboard and Hdmi display but when Iam connected over SHH from my windows Pc using Putty it does not shutdown. It looks like this :

pi@transceiver02 ~ $ sudo shutdown -h -P now
The system is going down for system halt NOW!s/1) (Fri Sep 11 09:45:06 2015):
pi@transceiver02 ~ $ ls
bluez-5.33           command   python_games    testInst
bluez-5.33.tar.xz    Desktop   ShutdownBtn.py  text.txt
bluez-5.33.tar.xz.1  PTest.py  ShutDownBtn.sh
pi@transceiver02 ~ $

So How do I realy shutdown the Raspberry over SSH ?

  • Please supply information about what OS and what version of that OS you are using. Also, please tell us, whether you use systemd or not. – Izzy Sep 11 '15 at 10:15
  • I am using Raspbian Version 3.18 i think i did not uses systemd but i am not sure – Zion Sep 11 '15 at 10:27
  • Try ps ax | grep -E "(systemd|upstart|init)" in a terminal and look for systemd or init. This will be your init system. – Izzy Sep 11 '15 at 10:47
  • OK I get 1 ? Ss 0:01 init [2] – Zion Sep 11 '15 at 11:01
  • Thanks Erverbody I use sudo init 0 and it works! – Zion Sep 11 '15 at 11:05

Depending on your init system, the command may vary.

On a Raspbian with systemd you can switch off the system with:

sudo systemctl poweroff

On a system with SysV-Init system, you can use:

sudo shutdown -h now


sudo halt

You can, of course, ommit the sudo if you are already logged in as root or su'd before executing.


sudo shutdown -h now should work and I do this all the time. The -P doesn't hurt, but as the Pi doesn't have power control does nothing.

This is the recommended method of halting. It can take a little time to actually shut down. It is possible that some running system process may slow things down.


Another datapoint, if its useful. I regularly shutdown via ssh, but I run ssh from the command line (not via Putty).

The following shuts down my Pi and powers off (HDMI out becomes disabled, but always on Power LED stays on). Note: this is on Raspbian, and I ran uname to show you my version. The commands below were run remotely from my Macbook.

# ssh pi@raspberrypi -t uname -a
Linux raspberrypi 3.18.7-v7+ #755 SMP PREEMPT Thu Feb 12 17:20:48 GMT 2015 armv7l GNU/Linux
Connection to raspberrypi closed.
# ssh pi@raspberrypi -t sudo shutdown -h -P now

Broadcast message from root@raspberrypi (pts/0) (Fri Sep 11 12:40:01 2015):
The system is going down for system halt NOW!
Connection to raspberrypi closed.

protected by goldilocks Sep 14 '15 at 11:18

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.