How to properly turn off the Raspberry Pi

As you may have noticed, there is no button to enable or disable the Raspberry Pi. Your first instinct is probably to unplug the power cord, but this is highly discouraged.

In this tutorial, TipsMake.com will show you all the steps to properly shut down your Raspberry Pi.

Why should not unplug the power cord to turn off the Pi?

There are many reasons why unplugging the power cord while the operating system is still running isn't a good idea.

First, if you unplug the power cord early, you increase the risk of damaging the SD card.

Second, whatever is running will not exit and save as you expect. This forced exit can cause data loss depending on what the Raspberry Pi was doing at the time.

There are more problems that can arise when unplugging the power cord without turning the operating system off first, and be sure you understand well too: Improperly disabling the Pi can cause problems.

Luckily, disabling the Raspberry Pi is super easy, just take a look below for all the exact steps.

How to properly turn off the Raspberry Pi Picture 1How to properly turn off the Raspberry Pi Picture 1

Shutdown command

The easiest way to turn off the Raspberry Pi correctly is by using a simple command. You can find the order just below.

sudo shutdown -h now

The command will do the following process to make sure the operating system is properly shut down.

Step 1. The command sends SIGTERM to all running processes, so they can be properly saved and exited.

Step 2. After a while, it will send SIGKILL so all remaining processes are paused.

Step 3. Finally, it will disconnect all file systems.

Step 4. The screen will now show System Halted .

Step 5. Now, you can unplug the power cord with minimal risk for your Raspberry Pi and the operating system.

Step 6. To boot up the Raspberry Pi, simply reconnect the USB power cord.

There are other ways you can improve this, such as creating your own power button using the pin GPIO.

4 ★ | 2 Vote