11

I often SSH into my Raspberry Pi, which is connected to my network via a wired connection. The last time I tried to reboot it, though, it failed:

pi@raspberrypi ~ $ shutdown now -bash: /sbin/shutdown: cannot execute binary file
pi@raspberrypi ~ $ sudo shutdown now /sbin/shutdown: 1: /sbin shutdown: Syntax error: word unexpected (expecting ")")

I am currently running Raspbian.

Could the files be corrupted? How can I now safely restart it? Will I just have to power cycle it? Last time I did so, I had to reinstall the OS to get it to start up.

PitaJ
  • 211
  • 1
  • 2
  • 4

3 Answers3

4

The correct syntax to power off are:

sudo shutdown -h now

sudo halt

And for reboot:

sudo shutdown -r now

sudo reboot

Be sure you use either sudo or logged as root himself.

Ghanima
  • 15,855
  • 15
  • 61
  • 119
Willian Paixao
  • 352
  • 4
  • 15
3

I think the files are corrupted. Just reinstall Raspbian. (You can backup your files before doing that, if you rpi is still running)

1

You could try the:

sudo reboot

or

sudo poweroff

Commands