Raspberry Pi深受儿童和成人的喜爱,是目前最好的单板计算机之一,通常用于数千个项目的核心。但是,与所有计算机一样,保持Raspberry Pi处于最新状态以确保其具有最新的功能和修复非常重要。
大多数Raspberry Pi设备都使用 Raspbian,这是一种基于 Debian 的Linux操作系统,专为这款微型 PC 设计。如果您以前使用过Linux,并且对使用终端感到满意,那么更新您的Raspberry Pi不会太困难。如果您不确定,以下是如何将Raspberry Pi更新到最新版本。
如何更新树莓派软件(How to Update Raspberry Pi Software)
Raspberry Pi是一款体积小巧、功能丰富的计算机。它可能看起来不多,但无论您使用的是 Raspbian、Ubuntu还是其他Linux操作系统,它都能够运行最好的 Linux 应用程序。(best Linux apps)
这意味着,与任何其他Linux PC 一样,您需要使用 Raspbian 的内置包管理器apt使您的(apt)Raspberry Pi使用的软件包保持最新。
- 要更新Raspberry Pi上的软件包,请打开终端窗口或使用SSH客户端远程连接到您的 Pi。您首先需要从软件存储库包列表中更新包列表。要执行此操作,请键入sudo apt update,然后按回车键运行它。
- 更新软件包列表后,键入sudo apt full-upgrade并按 Enter 将所有已安装的软件包更新到最新的可用版本。
- 软件包完成更新后,最好通过键入sudo apt clean(sudo apt clean)并按 Enter来整理和清除所有现在冗余的软件包文件。
虽然在大多数情况下没有必要,但在任何软件包更新完成安装后,请随时通过键入sudo reboot重新启动您的(sudo reboot)Raspberry Pi ,以确保该过程正确完成。(Raspberry Pi)
如何更新树莓派固件(How to Update Raspberry Pi Firmware)
Raspberry Pi Foundation负责 Raspberry Pi 的开发,(Raspberry Pi)以及它运行的固件。不时发布新固件,为您的Raspberry Pi添加重要的安全修复程序或更新。
要更新您的Raspberry Pi固件,请运行命令sudo apt update或sudo apt full-update,这将使用稳定的固件版本更新您的Raspberry PI 。如果这还不够好并且您需要更新到最新的可用固件(例如,对于关键错误修复),您将需要使用rpi-update工具。
Raspberry PI应该与 Raspbian 一起安装,但它也与其他Linux操作系统兼容。您可以从rpi-update GitHub 页面(rpi-update GitHub page)下载并安装它。
- 要更新Raspberry Pi固件,您需要确保安装了最新版本的rpi-update工具。打开与Raspberry Pi的终端或(Raspberry Pi)SSH连接,然后在回车之前输入sudo apt update && sudo apt install rpi-update。
- 如果安装了最新版本,输入sudo rpi-update运行固件更新工具,然后回车。您需要通过按键盘上的Y键来确认是否要继续进行固件升级。
更新Raspberry Pi(Raspberry Pi)固件后,您需要重新启动-如果 rpi-update 工具没有自动执行此操作,请键入sudo reboot来执行此操作。(sudo reboot)
如何在 Raspberry Pi 上安装主要的 Raspbian 更新(How to Install a Major Raspbian Update on a Raspberry Pi)
虽然apt update过程会更新您的软件包,但它不会更新您的系统。虽然 Raspbian 可以手动更新到主要的新版本,但没有自动工具可以做到这一点。
从一个 Raspbian 版本手动更新到下一个版本是非常有问题的,特别是考虑到从一个版本到下一个版本对包和功能的更改。要从较旧的 Raspbian 版本执行重大更新,您应该首先备份您的Raspberry Pi并将最新版本的 Raspbian 闪存到您的Raspberry Pi的 microSD 卡(或旧 Pi 型号的 SD 卡)。
这也是Raspberry Pi 基金会推荐(Raspberry Pi Foundation recommends)的就地升级方法,因为它是从一个主要 Raspbian 版本迁移到下一个主要版本的最干净、最快和最好的方法。这样做会擦除您的 microSD 卡,因此请确保在开始之前将您希望保留的所有文件备份到外部驱动器。
- 为此,您需要为您的操作系统下载并安装 Raspberry Pi Imager 工具。(download and install the Raspberry Pi Imager tool)这将自动下载最新版本的 Raspbian 的映像文件并将其直接闪存到您的 microSD 卡。
- 安装Raspberry Pi Imager工具后,取出 Raspberry Pi 的 microSD 卡并将其连接到 PC,然后启动Raspberry Pi Imager。在Imager窗口中,单击选择操作系统(Choose OS)按钮并从选项窗口中选择Raspbian 。
- 选择 Rasbian 后,单击选择 SD 卡(Choose SD Card)按钮,然后从 SD 卡选择菜单中选择您的 microSD 卡。
- 当您准备好开始使用最新版本的Raspbian刷写 microSD 卡时,请按下写入(Write)按钮。
- Raspberry Pi Imager工具将需要一些时间来下载 Raspbian 并将其写入您的 microSD 卡。该过程完成后,按继续(Continue)以结束该工具。
您将能够安全地移除 microSD 卡,将其重新插入您的Raspberry Pi并在此时打开电源。如果该过程成功,您将能够继续初始设置过程并将所有备份文件恢复到新的 Raspbian 安装。
您还应该打开一个终端窗口并运行sudo apt update && sudo apt full-upgrade以确保为您的全新 Raspbian 安装安装了最新的软件包。
保持树莓派更新(Keeping Your Raspberry Pi Updated)
虽然像Raspberry Pi这样的(Raspberry Pi)Linux设备通常被认为比Windows设备更安全,但这并不意味着保持Raspberry Pi更新不是必需的。定期更新会带来新软件、错误修复、改进等。
现在您知道如何更新Raspberry Pi了,熟悉使用(Raspberry Pi)Linux终端可能是一个好主意,尤其是您可以在 Pi 上尝试一些很酷的 Linux 终端命令。(cool Linux terminal commands)在下面的评论部分让我们知道您自己的Raspberry Pi技巧和项目想法。
How To Update Raspberry Pi
Loved bу kids and аdults alike, the Raspbеrry Pi is one of the bеst single-board cоmputers out there, often used at the heart of thousands of projects. Like all comрuterѕ, however, it’s important to keep уour Raspberry Pi up-to-date to ensure it has the latest features and fixes.
Most Raspberry Pi devices use Raspbian, the Debian-based Linux operating system specially designed for this tiny PC. If you’ve used Linux before, and you’re comfortable using the terminal, updating your Raspberry Pi won’t be too difficult. If you’re unsure, here’s how to update a Raspberry Pi to the latest version.
How to Update Raspberry Pi Software
The Raspberry Pi is a tiny, feature-filled computer. It may not look like much, but it’s more than capable of running the best Linux apps, whether you’re using Raspbian, Ubuntu, or another Linux operating system with it.
That means that, like any other Linux PC, you’ll want to keep the software packages your Raspberry Pi use up-to-date using Raspbian’s built-in package manager—apt.
- To update the packages on your Raspberry Pi, open a terminal window or connect to your Pi remotely using an SSH client. You’ll first need to update the list of packages from the software repository package lists. To do this type sudo apt update, then hit enter to run it.
- Once your package lists are updated, type sudo apt full-upgrade and hit enter to update all installed software packages to the latest available versions.
- Once the packages have finished updating, it’s a good idea to tidy up and clear any now-redundant package files by typing sudo apt clean and hitting enter.
While it isn’t necessary in most instances, feel free to restart your Raspberry Pi by typing sudo reboot once any package updates have finished installing to ensure the process finishes correctly.
How to Update Raspberry Pi Firmware
The Raspberry Pi Foundation is responsible for the development of the Raspberry Pi, as well as the firmware it runs. From time to time, new firmware is released to add important security fixes or updates to your Raspberry Pi.
To update your Raspberry Pi firmware, run the command sudo apt update or sudo apt full-update, which will update your Raspberry PI with stable firmware releases. If that isn’t good enough and you need to update to the latest available firmware (for critical bug fixes, for instance) you’ll need to use the rpi-update tool instead.
The Raspberry PI should come installed with Raspbian, but it’s also compatible with other Linux operating systems. You can download and install it from the rpi-update GitHub page.
- To update your Raspberry Pi firmware, you’ll need to make sure you have the latest version of the rpi-update tool installed. Open a terminal or SSH connection to your Raspberry Pi, then type sudo apt update && sudo apt install rpi-update before hitting enter.
- If the latest version is installed, type sudo rpi-update to run the firmware updating tool, then hit enter. You’ll need to confirm whether or not you wish to proceed with the firmware upgrade by pressing the Y key on your keyboard.
You’ll need to reboot once your Raspberry Pi firmware has updated—type sudo reboot to do this if the rpi-update tool doesn’t do it automatically.
How to Install a Major Raspbian Update on a Raspberry Pi
While the apt update process will update your software packages, it won’t update your system. While Raspbian can be updated to a major new release manually, there’s no automatic tool to do this.
Performing a manual update from one Raspbian version to the next is extremely problematic, especially given the changes to packages and features from one release to the next. To perform a major update from an older Raspbian release, you should first back up your Raspberry Pi and flash the latest version of Raspbian to your Raspberry Pi’s microSD card (or SD card for older Pi models).
This is also the method that the Raspberry Pi Foundation recommends over an in-place upgrade because it’s the cleanest, quickest, and best way to move from one major Raspbian release to the next. Doing this will wipe your microSD card, so make sure any files you wish to keep are backed up to an external drive before you begin.
- To do this, you’ll need to download and install the Raspberry Pi Imager tool for your operating system. This will automatically download the image file for the latest version of Raspbian and flash it to your microSD card directly.
- Once the Raspberry Pi Imager tool is installed, remove your Raspberry Pi’s microSD card and connect it to your PC, then launch the Raspberry Pi Imager. In the Imager window, click the Choose OS button and select Raspbian from the option window.
- With Rasbian selected, click the Choose SD Card button, then select your microSD card from the SD card selection menu.
- When you’re ready to begin flashing your microSD card with the latest version of Raspbian, press the Write button.
- The Raspberry Pi Imager tool will take some time to download and write Raspbian to your microSD card. Once the process is complete, press Continue to end the tool.
You’ll be able to safely remove the microSD card, insert it back into your Raspberry Pi and power it up at this point. If the process was successful, you’ll be able to proceed with the initial setup process and restore any backed up files to your new Raspbian installation.
You should also open a terminal window and run sudo apt update && sudo apt full-upgrade to ensure that the latest software packages are installed for your fresh Raspbian installation.
Keeping Your Raspberry Pi Updated
While Linux devices like the Raspberry Pi are generally considered to be more secure than their Windows counterparts, that doesn’t mean it isn’t essential to keep your Raspberry Pi updated. Regular updates bring new software, bug fixes, advancements, and more.
Now you know how to update a Raspberry Pi, it’s probably a good idea to get comfortable using the Linux terminal, especially with some cool Linux terminal commands you can try on your Pi. Let us know your own Raspberry Pi tips and project ideas in the comments section below.