I have mounted my Raspberry Pi videos folder into my Ubuntu 10.04 system. I can paste different videos to mounted directory along with videos folder in Raspberry Pi whenever I require.

The problem is I want to restart the Raspberry Pi every time manually to play newly pasted content in the videos folder. So, I decided that I want to reboot the Raspberry Pi by writing the script and run it on my local system.

Is there a command available to restart the Raspberry Pi through my local system?

  • Wouldn't it be faster to just restart your video player, instead of rebooting the whole Pi?
    – Arne
    Jun 13, 2013 at 9:36
  • I need to restart two raspberry pi from my ubuntu system(via shell script).@Arne
    – Viswa
    Jun 13, 2013 at 10:39

2 Answers 2


something like this might help:

$ ssh [email protected] 'echo raspberry | sudo shutdown -r now'

this command connects to your raspberry using SSH and issues the reboot command, make sure you replace 192.168.1.XXX with the real address and pi/raspberry with your real login/password.

  • dude,i run this command in my terminal "ssh [email protected] 'echo openelec | shutdown -r now'" then it prompts password, i was typed and it throws "sh:shutdown:command not found"
    – Viswa
    Jun 13, 2013 at 7:49
  • try to specify the full path to the shutdown command, you may find if using which shutdown while logged to your pi.
    – lenik
    Jun 13, 2013 at 7:52
  • ssh [email protected] reboot this command is working, if i suppose to reboot two raspberry pi at a time means how to do
    – Viswa
    Jun 13, 2013 at 8:28
  • 2
    ssh [email protected] reboot; ssh [email protected] reboot ? put several commands in line, separate with ";" and specify correct IP addresses.
    – lenik
    Jun 13, 2013 at 8:33
  • Does "sudo shutdown" and "Sudo halt" do the same thing ? Feb 19, 2015 at 6:19

Also note that user name prefixed by @ can vary from vendor of your OS, for example Arch Linux : root (and you do not need sudo) Debian : pi (you need sudo) Pidora : any name you chosen at setup (and you need sudo plus password)

I setup a user in Pidora with same name as I use at Ubuntu, so I do not need to specify any @ prefix.

  • Through this command "ssh [email protected] reboot" i can reboot my raspberry, but i need to reboot morethan one raspberry pi at time. How to do
    – Viswa
    Jun 13, 2013 at 8:29
  • Run the command twice ? Or write a script to run it for both IP addresses
    – Lawrence
    Jun 14, 2013 at 3:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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