Raspberry Pi – Raspbianのバージョン確認

以下、3通り。
debian_version
catコマンドで、/etc/debian_version
を見る。
cat /etc/debian_version
9.4
issue
catコマンドで、etc/issue
を見る。
cat /etc/issue
Raspbian GNU/Linux 9 \n \l
lsb_releaseコマンド
-a
をつけて。
lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 9.4 (stretch)
Release: 9.4
Codename: stretch
なければインストールする。
# 確認
dpkg -l | grep lsb
# 無いのでインストール
sudo apt-get install -y lsb_release
モデルを調べる
cat /proc/device-tree/model
Raspberry Pi 3 Model B Plus Rev 1.3