How do you update and upgrade the Raspberry Pi OS?
To update and upgrade Raspberry Pi OS, you use the terminal and a few simple commands. Here’s a clean, step-by-step guide:\
1. Open Terminal
You can access the terminal via:
-
Desktop: Menu → Accessories → Terminal
-
Headless SSH: Connect remotely via SSH (e.g.,
ssh pi@raspberrypi.local)
2. Update Package List
This checks the repositories and fetches the latest list of available packages.
3. Upgrade Installed Packages
-
This installs new versions of packages and removes obsolete ones if needed.
-
Safer and more thorough than
apt upgrade.
4. Clean Up (Optional)
-
Frees space by removing unused packages and cached files.
5. Update Raspberry Pi Firmware (Optional)
For updating bootloader, kernel, and firmware:
Use with caution! Only use this if you need the latest bleeding-edge firmware (e.g., for hardware fixes). It’s not part of standard updates.
6. Reboot
Summary Table
| Step | Command | Purpose |
|---|---|---|
| Update list | sudo apt update | Refreshes available packages |
| Upgrade system | sudo apt full-upgrade | Applies updates and removes old |
| Clean up | sudo apt autoremove | Deletes unused packages |
| Firmware update (opt) | sudo rpi-update | Gets latest kernel/firmware |
| Reboot | sudo reboot | Applies changes |

评论
发表评论