如何打开和关闭树莓派（绝对新手）
树莓派

> 
> 这篇短文教你如何打开树莓派以及如何在之后正确关闭它。
> 
> 
> 


![](/data/attachment/album/201908/19/192825rlrjy3sj77j7j79y.jpg)


[树莓派](https://www.raspberrypi.org/)是[最流行的 SBC（单板计算机）](/article-10823-1.html)之一。如果你对这个话题感兴趣，我相信你已经有了一个树莓派。我还建议你使用[其他树莓派配件](https://itsfoss.com/things-you-need-to-get-your-raspberry-pi-working/)来开始使用你的设备。


你已经准备好打开并开始使用。与桌面和笔记本电脑等传统电脑相比，它有相似以及不同之处。


今天，让我们继续学习如何打开和关闭树莓派，因为它并没有真正的“电源按钮”。


在本文中，我使用的是树莓派 3B+，但对于所有树莓派变体都是如此。


### 如何打开树莓派


![Micro USB port for Power](/data/attachment/album/201908/19/192844a159a986axhhlxs0.png)


micro USB 口为树莓派供电，打开它的方式是将电源线插入 micro USB 口。但是开始之前，你应该确保做了以下事情。


* 根据官方[指南](https://www.raspberrypi.org/documentation/installation/installing-images/README.md)准备带有 Raspbian 的 micro SD 卡并插入 micro SD 卡插槽。
* 插入 HDMI 线、USB 键盘和鼠标。
* 插入以太网线（可选）。


成上述操作后，请插入电源线。这会打开树莓派，显示屏将亮起并加载操作系统。


如果您将其关闭并且想要再次打开它，则必须从电源插座（首选）或从电路板的电源端口拔下电源线，然后再插上。它没有电源按钮。


### 关闭树莓派


关闭树莓派非常简单，单击菜单按钮并选择关闭。


![Turn off Raspberry Pi graphically](/data/attachment/album/201908/19/192848nvv75vv075zhz7y7.jpg)


或者你可以在终端使用 [shutdown 命令](https://linuxhandbook.com/linux-shutdown-command/)



```
sudo shutdown now
```

`shutdown` 执行后**等待**它完成，接着你可以关闭电源。


再说一次，树莓派关闭后，没有真正的办法可以在不关闭再打开电源的情况下打开树莓派。你可以使用 GPIO 打开树莓派，但这需要额外的改装。


\*注意：Micro USB 口往往是脆弱的，因此请关闭/打开电源，而不是经常拔出插入 micro USB 口。


好吧，这就是关于打开和关闭树莓派的所有内容，你打算用它做什么？请在评论中告诉我。




---


via: <https://itsfoss.com/turn-on-raspberry-pi/>


作者：[Chinmay](https://itsfoss.com/author/chinmay/) 选题：[lujun9972](https://github.com/lujun9972) 译者：[geekpi](https://github.com/geekpi) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
![Warp Terminal](/assets/images/warp-terminal.webp)


![Warp Terminal](/assets/images/warp-terminal.webp)

The [Raspberry Pi](https://www.raspberrypi.org/?ref=itsfoss.com) is one of the [most popular SBC (Single-Board-Computer)](https://itsfoss.com/raspberry-pi-alternatives/). If you are interested in this topic, I believe that you’ve finally got a Pi device. I also advise getting all the [additional Raspberry Pi accessories](https://itsfoss.com/raspberry-pi-accessories/) to get started with your device.

You’re ready to turn it on and start to tinker around with it. It has its own similarities and differences compared to traditional computers like desktops and laptops.

Today, let’s go ahead and learn how to turn on and shutdown a Raspberry Pi, as it doesn’t really feature a ‘power button’ of sorts.

For this article, I’m using a Raspberry Pi 3B+, but it’s the same for all the Raspberry Pi variants.

## How to turn on Raspberry Pi

![Raspberry Pi 3 Microusb](https://itsfoss.com/content/images/wordpress/2019/04/raspberry-pi-3-microusb.png?fit=800%2C532&ssl=1)

*If you have never used **Raspberry Pi like devices**, you would probably search for the power button to turn on the Raspberry Pi. Unfortunately, that’s not the case here.*

The micro USB port powers the Raspberry Pi and the way you turn it on is by plugging in the power cable into the micro USB port.

But, before you do that you should make sure that you have done the following things.

- Preparing the micro SD card with Raspbian according to the official
[guide](https://www.raspberrypi.org/documentation/installation/installing-images/README.md?ref=itsfoss.com)and inserting into the micro SD card slot. - Plugging in the HDMI cable, USB keyboard and a Mouse.
- Plugging in the Ethernet Cable(Optional).

Once you have done the above, plug in the power cable. This turns on the Raspberry Pi and the display will light up and load the Operating System. You should see a green light blinking periodically.


**If you turned it off and you want to turn it on again, you’ll have to unplug the power cord either from the power socket (preferred) or from the power port of the board. There is no power button.**## How to shut down the Raspberry Pi

Shutting down the Pi is pretty straightforward, click the menu button and choose shutdown.

![Raspbian Ui Menu for turn off](https://itsfoss.com/content/images/wordpress/2019/04/Raspbian-ui-menu.jpg?fit=800%2C492&ssl=1)

Alternatively, you can use the [shutdown command](https://linuxhandbook.com/linux-shutdown-command/?ref=itsfoss.com) in the terminal:

`sudo shutdown now`


Once the shutdown process has started, **wait **till it completely finishes and then you can cut the power to it.

Again, once the Pi shuts down, there is no real way to turn the Pi back on without turning off and turning on the power. You could the GPIO’s to turn on the Pi from the shutdown state but it’ll require additional modding.

Well, that’s about all you should know about turning on and shutting down the Pi, what do you plan to use it for? Let me know in the comments.