概要
Raspberry Piの稼働環境を常に最新状態に保つため、必要なコマンドをまとめておきます。
Raspberry Pi OSをアップデート
-
Raspbian OS/Raspberry Pi OSのバージョンを確認します。
cat /etc/debian_version
9.13
cat /etc/issue
Raspbian GNU/Linux 9 \n \l
cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)" NAME="Raspbian GNU/Linux" VERSION_ID="9" VERSION="9 (stretch)" VERSION_CODENAME=stretch ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_URL="http://www.raspbian.org/RaspbianForums" BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
lsb_release -a
No LSB modules are available. Distributor ID: Raspbian Description: Raspbian GNU/Linux 9.13 (stretch) Release: 9.13 Codename: stretch
-
Raspbian OS/Raspberry Pi OSを最新版に更新します。
sudo apt update sudo apt upgrade sudo apt autoremove
sudo vi /etc/apt/sources.list
#deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
sudo apt update sudo apt dist-upgrade
-
Raspbian OS/Raspberry Pi OSのバージョンを確認します。
cat /etc/debian_version
10.7
cat /etc/issue
Raspbian GNU/Linux 10 \n \l
cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)" NAME="Raspbian GNU/Linux" VERSION_ID="10" VERSION="10 (buster)" VERSION_CODENAME=buster ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_URL="http://www.raspbian.org/RaspbianForums" BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
lsb_release -a
No LSB modules are available. Distributor ID: Raspbian Description: Raspbian GNU/Linux 10 (buster) Release: 10 Codename: buster
-
参考
バージョンとコードネームの一覧はこちらを参照してください。
Debian のリリース
ファームウェアをアップデート
-
ファームウェアのバージョンを確認します。
vcgencmd version
Nov 30 2020 22:14:49 Copyright (c) 2012 Broadcom version ab1181cc0cb6df52bfae3b1d3fef0ce7c325166c (clean) (release) (start_x)
-
ファームウェアをアップデートします。
sudo rpi-update
-
アップデート完了後、リブートします。
sudo reboot
-
ファームウェアのバージョンを確認します。
vcgencmd version
Dec 15 2020 18:35:32 Copyright (c) 2012 Broadcom version 4b4aff21f72c5b9ba39d83c7b0f8fa910a6ef99b (clean) (release) (start_x)