10
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Raspberry Pi と Raspbian のバージョンを調べるコマンドやファイル

Posted at

Raspberry Pi のモデル情報

/proc/device-tree/model

Raspberry Pi 3 Model B の場合。

$ cat /proc/device-tree/model
Raspberry Pi 3 Model B Rev 1.2

/proc/cpuinfo は当てにならない機種があるようなので参照しないほうが良い。

Raspberry Pi Documentation

Why does cpuinfo report I have a BCM2835?

The upstream Linux kernel developers had decided that all models of Raspberry Pi return bcm2835 as the SoC name. At Raspberry Pi we like to use as much upstream kernel code as possible, as it makes software maintenance much easier, so we use this code. Unfortunately, it means that cat /proc/cpuinfo is inaccurate on later Raspberry Pi models that use different SoCs. You can use cat /proc/device-tree/model to get an accurate description of the SoC on your Pi model.

Raspbian のバージョン

/etc/os-release

/etc/os-release は /usr/lib/os-release へのシンボリックリンクになっている。

$ 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"

/etc/debian_version

$ cat /etc/debian_version
10.2

LSB (Linux Standard Base) 情報

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Raspbian
Description:	Raspbian GNU/Linux 10 (buster)
Release:	10
Codename:	buster

カーネル情報

$ uname -m
armv7l

$ uname -o
GNU/Linux

$ uname -r
4.19.75-v7+

$ uname -s
Linux

$ uname -v
#1270 SMP Tue Sep 24 18:45:11 BST 2019

$ uname -morsv
Linux 4.19.75-v7+ #1270 SMP Tue Sep 24 18:45:11 BST 2019 armv7l GNU/Linux

$ uname -a
Linux raspberrypi 4.19.75-v7+ #1270 SMP Tue Sep 24 18:45:11 BST 2019 armv7l GNU/Linux

参考資料

10
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?