If you’ve just got your Raspberry Pi, you probably noticed it lacks a power button. This might leave you wondering how to turn the miniature computer on and off. Let’s walk through it all, step by step.
How to Turn On the Raspberry Pi
To start up your Raspberry Pi, all you have to do is plug it in. Beginning with the Raspberry Pi Model 4, you simply need a USB-C cable and any 5V power source. Older models of the Raspberry Pi still require a 5V power source, but use a micro USB connector.
First, make sure you have your HDMI cable connected to your TV or monitor, along with your keyboard and mouse of choice. USB keyboards and mice work fine on first boot, as do most wireless combos with their own USB receiver. Later, you can connect any Bluetooth keyboard or mouse to your Raspberry Pi.
Plug the power adapter into an outlet, connect the USB-C cable to it, then plug the other end into your Raspberry Pi.
A red LED will turn on, and you’ll see a rainbow screen followed by the Raspberry Pi OS desktop. From this point, if it’s your first boot into Raspberry Pi OS, you’ll go through some setup menus.
How to Turn a Raspberry Pi Off the Right Way
Since all you have to do to start up the Raspberry Pi is plug it in, you just unplug it to power down, right? Absolutely not, actually. Abruptly removing power before shutting the operating system down can cause your SD card to get corrupted. This danger is worse for some operating systems than others, but it is definitely still a threat to Linux, the most common OS used on Raspberry Pi. Do that enough times, and your Raspberry Pi won’t boot up all the way until you reinstall.
Instead, you need to do a proper shutdown. There are a couple of ways to do this. In Raspberry Pi OS, you can do this by clicking the Raspberry icon in the top left corner of your screen and choosing Log Out.
On the next menu, you can choose to log out, shut down, or reboot. If you’re done for the day, choose Shut Down. After a few minutes, your screen should go completely black and you’ll notice the red LED on the Pi go out.
The second way to shut down your Raspberry Pi is from the terminal. Simply open a terminal, type in this command, and hit Enter:
sudo shutdown -h now
Again, you’ll soon see the screen go black and the red power LED turn off. After that, you can safely remove the power cord. When you’re ready to start your Raspberry Pi again, reconnect the power cord.
Add a Power Button to Your Raspberry Pi
Of course, you can also add a power button to your Raspberry Pi. There are cases that have include a power button, such as Argon40’s Argon ONE M.2 case. Also, CanaKit makes a power button attachment for the USB-C power cable. The drawback to CanaKit’s solution is that it simply kills power to the USB-C plug; there’s no way to signal a graceful shutdown to the OS.
One thing to be mindful of is that your Raspberry Pi will not automatically know to do a proper shutdown when you press the power button. For a power button to trigger the shutdown command, it needs to be wired into the GPIO header. You’ll also have to program your Pi to trigger the shutdown command when you push the button.
Of course, you may not want to dive into a project like that right now. In that case, you’ll probably want to stick with an external, prebuilt power button.
CanaKit Raspberry Pi 4 Power Supply with PiSwitch
Make powering your Pi on and off a cinch with this UL-listed power supply made specifically for the Pi 4.
- › What Is GPIO, and What Can You Use It For?
- › The Chip Shortage Is so Bad Raspberry Pi Prices Have Gone Up
- › How to Post on Reddit
- › Dimmable LED Bulbs Keep Burning Out? Do This
- › How to Remove Blank Rows in Excel
- › How to Turn Off Track Changes in Word
- › Is Your Phone Listening to You?
- › How to Insert a PDF in Google Slides