Yes, the Raspberry Pi doesn’t come with a power button to shut down or restart the board. You must use the terminal or desktop GUI to apply the changes. But the best part is that you can connect to the Raspberry Pi remotely and SSH into the terminal. From there, you can easily shut down or restart your Raspberry Pi. You can also use your Windows laptop as a monitor for your Raspberry Pi to perform these operations. Therefore, for more information on the steps to shut down the Raspberry Pi, proceed to the tutorial.
Contents
Shut down or restart the Raspberry Pi (2021)
This article described multiple ways to shut down or restart your Raspberry Pi. You can also use the desktop GUI, terminal, or add a physical power button to the RPi board. That said, let’s dive into these methods.
How to shut down raspberry pie
Method 1: Desktop GUI
If you’re using a Raspberry Pi from a desktop GUI (such as Raspbian OS), shutting down the board is as easy as possible.
1. Click on the raspberry menu in the upper left corner and click “Logout“.
2. Next, “shut downThe “” button in the pop-up window, that’s it. The Raspberry Pi will shut down immediately.
Method 2: Use terminal commands
If you use the Raspberry Pi’s terminal over SSH or a wired connection, there are several ways to shut down your Raspberry Pi.
1. First, open a terminal and run One of the following commands.. They will immediately shut down your RPi.
sudo poweroff
also
sudo shutdown -h now
2. When shutting down the Raspberry Pi After a certain period, You can define the arguments like this. Here, 30
This means that the Raspberry Pi will shut down after 30 minutes.In addition, you can use shutdown -c
A command that cancels a scheduled shutdown operation.
sudo shutdown -h 30
3. To shut down the Raspberry Pi At a specific timeFor example, at 9 pm, the command could be defined as: Remember that the terminal follows a 24-hour clock.
sudo shutdown -h 21:00
If you are an advanced user, you can go ahead and add Physical power button via GPIO pin On the raspberry pie board. You also need to configure the GPIO header through the terminal. Visit this page for a detailed tutorial. Alternatively, if you need a simpler solution, buy a USB Type-C power switch cable ($ 7.99) from Amazon to power off / on your Raspberry Pi effortlessly.
Method 4: Unplug
Finally, if you don’t want to use the terminal or desktop GUI, it’s easy to do. Disconnect the power cable Shut down the Raspberry Pi. This will turn off the Raspberry Pi immediately, but we recommend using one of the other methods above. However, be sure to save all your work when unplugging.
How to restart Raspberry Pi
Method 1: Desktop GUI
Similar to the shutdown process, you can restart your Raspberry Pi from your desktop GUI environment. The procedure is the same.
1. Open Raspberry menu From the upper left corner “Logout“.
2. Here, “rebootA “” will appear in the pop-up window and the Raspberry Pi will restart immediately.
Method 2: Use terminal commands
1. To restart the Raspberry Pi immediately Start the terminal Execute one of the following commands. These commands work over a wired or SSH connection, so you can also reboot the Raspberry Pi board remotely.
sudo reboot
also
sudo shutdown -r now
Turn off or restart your Raspberry Pi in a few simple steps!
Here’s how to shut down the Raspberry Pi or restart it using the desktop GUI or terminal. Also, if you are familiar with the hardware, we recommend adding a power switch via the GPIO header pins on the board. Anyway, it’s all from us. Follow the linked article for more information on the best Raspberry Pi commands. If you have any questions, please let us know in the comments below.