How to Shut Down or Reboot Your Raspberry Pi

By Richard Wentk

You can’t turn off your Raspberry Pi by pulling out the power plug or turning off the mains power. Or rather you can, but you shouldn’t — ever — except as a very last resort.

This information is more important than it looks. In fact, it’s very important, so don’t ignore it or skip over it.

Linux does a lot of stuff as it works. In computer world, it throws its old clothes all over the room, leaves a pile of old plates on the desk, and generally makes a big mess.

You can’t see this mess because it’s on the memory card. But it’s there. And it needs to be cleaned up regularly.

If you turn off the power, the mess stays. And it gets worse and worse every time you use your Pi.

But if you shut down or reboot the Pi, Linux cleans up the mess before going to sleep. It needs to be reminded to do this. The commands to make it happen are very simple.

To reboot your Pi, type the following command and press Enter:

sudo reboot

Your Pi cleans up the mess it made, shuts down, and restarts itself. When it’s done, you’ll see the command prompt.

To shut down your Pi when you’ve finished using it, type the following command and press Enter:

sudo poweroff

Your Pi cleans up the mess, but this time it shuts down and stays shut down. When the blinky light stops flashing on the Pi board and your monitor or TV goes blank, you can turn the power off.

The Pi board has a red power light. It stays on even after the board shuts down. Can you see any blinking or flickering after you power off? If not, the Pi has shut down, and you can turn off the power.