Skip to content

How-to / Raspberry Pi

Power up and shut down a Raspberry Pi safely

Your Raspberry Pi boots automatically when you connect power, but shutting it down safely requires a proper procedure. Learn three methods to shut down your Pi without risking data corruption.

BeginnerPower · BasicsBy Vilros

Power on your Pi

The Raspberry Pi doesn't have a traditional power switch—it powers on automatically as soon as you connect the power supply. This happens any time the Pi is unplugged and then plugged in again.

If your Pi is in a case with a power button LED:

  • A green light indicates the Pi is powered on and running.
  • A red light means the Pi is shut down but still connected to power, ready to be started.

If your Pi is already plugged in but shut down, simply press the power button on the case (if equipped). The Pi will boot up and the LED will turn green.

First boot

On first boot or after a fresh OS installation, Raspberry Pi OS will walk you through initial setup including language, timezone, password, and WiFi configuration. This only happens once.

Shut down safely

Never simply unplug your Raspberry Pi's power supply to turn it off. Abruptly removing power can corrupt your microSD card's filesystem, damage data, or even harm the Pi itself. Always shut down properly using one of the three methods below.

METHOD 1

Power button (if equipped)

If your Pi case has a physical power button:

  1. Press the power button once.
  2. A shutdown menu will appear on your screen with options including Shutdown, Reboot, and Logout.
  3. Either click Shutdown on screen or press the power button a second time.
  4. Your Pi will safely shut down.

This method also works if you don't have a display connected. Press the button, wait a moment, then press it again. The Pi will shut down automatically.

After shutdown

Even when shut down, the power button LED remains red to show the Pi is still connected to power and ready to be started again. Wait for shutdown to complete (green LED turns off or stops blinking) before disconnecting power.

METHOD 2

Command line

To shut down from Terminal or over SSH, use the shutdown command:

sudo shutdown now

When you press Enter, the Pi will immediately begin a safe shutdown sequence.

Shutdown with a delay

You can schedule a shutdown instead of shutting down immediately. For example, to shut down in 10 minutes:

sudo shutdown 10

The number represents minutes. This is useful if you want to finish a task before the system powers off. To cancel a scheduled shutdown:

sudo shutdown -c

Alternative commands

These commands also safely shut down your Pi:

  • sudo poweroff — immediate shutdown
  • sudo halt — stops all processes but may not power off (older systems)
  • sudo init 0 — classic Unix shutdown command

METHOD 3

Desktop menu

From the Raspberry Pi desktop:

  1. Click the Raspberry Pi menu icon in the top-left corner of the screen.
  2. Hover over or click Shutdown... at the bottom of the menu.
  3. In the Shutdown Options dialog, click Shutdown.

You can also choose Reboot from this menu to restart your Pi or Logout to return to the login screen without powering off.

If it doesn't work

  • Power button doesn't respond: Not all Raspberry Pi cases have power buttons. If yours doesn't, use the command line or desktop menu method. For cases with buttons, ensure the button is properly connected to the GPIO header according to the case instructions.
  • Pi won't power on after shutdown: If pressing the power button doesn't work, disconnect the power supply, wait 5 seconds, and reconnect it. The Pi should boot automatically.
  • Screen goes black but Pi doesn't shut down: Wait a full minute—shutdown can take time depending on running processes. If the power LED is still green or blinking after 2 minutes, there may be a problem. As a last resort, hold the power button for 10 seconds to force power off, but use this only when normal shutdown fails.
  • SD card corrupted after improper shutdown: If you accidentally pulled power and now the Pi won't boot, your SD card's filesystem may be damaged. You may need to re-image the SD card or attempt filesystem repair. Always shut down properly to avoid this.

Need help with power issues?

Tell us your Pi model, whether your case has a power button, and what happens when you try to shut down.

Contact Vilros Support ↗