[常見問與答] 如何看 Raspbian 的版本資訊?

自從 Raspbian 從 Wheezy 升級到 Jessie 以後,許多系統性的設計都有所不同。那要如何看 Raspbian 的版本資訊呢?

1. uname -a 查詢 kernel 版本。

# 2015-05-05-raspbian-wheezy 
pi@raspberrypi ~ $ uname -a
Linux raspberrypi 3.18.11-v7+ #781 SMP PREEMPT Tue Apr 21 18:07:59 BST 2015 armv7l GNU/Linux
# 2016-02-03-raspbian-jessie
pi@raspberrypi:~ $ uname -a
Linux raspberrypi 4.1.17-v7+ #834 SMP Mon Feb 1 15:17:54 GMT 2016 armv7l GNU/Linux

 

2. /opt/vc/bin/vcgencmd version 查詢 firmware 版本。

# 2015-05-05-raspbian-wheezy 
pi@raspberrypi ~ $ /opt/vc/bin/vcgencmd version
Apr 21 2015 14:42:19 
Copyright (c) 2012 Broadcom
version 2d5ad04b63af4233440c3f7c8587108223201102 (clean) (release)
# 2016-02-03-raspbian-jessie
pi@raspberrypi:~ $ /opt/vc/bin/vcgencmd version
Feb  1 2016 17:51:17 
Copyright (c) 2012 Broadcom
version b3dc56931507f355d503ea69397778643f7a3dc3 (clean) (release)

 

3. strings /boot/start.elf | grep VC_BUILD_ID 查詢 firmware 版本。

# 2015-05-05-raspbian-wheezy 
pi@raspberrypi ~ $ strings /boot/start.elf | grep VC_BUILD_ID
VC_BUILD_ID_USER: dc4
VC_BUILD_ID_TIME: 14:42:19
VC_BUILD_ID_BRANCH: master
VC_BUILD_ID_TIME: Apr 21 2015
VC_BUILD_ID_HOSTNAME: dc4-XPS13-9333
VC_BUILD_ID_PLATFORM: raspberrypi_linux
VC_BUILD_ID_VERSION: 2d5ad04b63af4233440c3f7c8587108223201102 (clean)
# 2016-02-03-raspbian-jessie
pi@raspberrypi:~ $ strings /boot/start.elf | grep VC_BUILD_ID
VC_BUILD_ID_USER: dc4
VC_BUILD_ID_TIME: 17:51:17
VC_BUILD_ID_BRANCH: master
VC_BUILD_ID_TIME: Feb  1 2016
VC_BUILD_ID_HOSTNAME: dc4-XPS13-9333
VC_BUILD_ID_PLATFORM: raspberrypi_linux
VC_BUILD_ID_VERSION: b3dc56931507f355d503ea69397778643f7a3dc3 (clean)

 

4. cat /proc/version 查詢更完整的 kernel 資料。

# 2015-05-05-raspbian-wheezy 
pi@raspberrypi ~ $ cat /proc/version
Linux version 3.18.11-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.8.3 20140303 (prerelease) (crosstool-NG linaro-1.13.1+bzr2650 - Linaro GCC 2014.03) ) #781 SMP PREEMPT Tue Apr 21 18:07:59 BST 2015
# 2016-02-03-raspbian-jessie
pi@raspberrypi:~ $ cat /proc/version
Linux version 4.1.17-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.8.3 20140303 (prerelease) (crosstool-NG linaro-1.13.1+bzr2650 - Linaro GCC 2014.03) ) #834 SMP Mon Feb 1 15:17:54 GMT 2016

 

5. cat /etc/os-release 查詢 OS 版本資訊。

# 2015-05-05-raspbian-wheezy 
pi@raspberrypi ~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 7 (wheezy)"
NAME="Raspbian GNU/Linux"
VERSION_ID="7"
VERSION="7 (wheezy)"
ID=raspbian
ID_LIKE=debian
ANSI_COLOR="1;31"
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
# 2016-02-03-raspbian-jessie
pi@raspberrypi:~ $ cat /etc/os-release 
PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
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"

 

6. cat /etc/issue 查詢 Linux distro 版本。

# 2015-05-05-raspbian-wheezy 
pi@raspberrypi ~ $ cat /etc/issue
Raspbian GNU/Linux 7 \n \l

# 2016-02-03-raspbian-jessie
pi@raspberrypi:~ $ cat /etc/issue
Raspbian GNU/Linux 8 \n \l

 

7. cat /etc/debian_version 查詢 Debian 版本編號。

# 2015-05-05-raspbian-wheezy 
pi@raspberrypi ~ $ cat /etc/debian_version
7.8
# 2016-02-03-raspbian-jessie
pi@raspberrypi:~ $ cat /etc/debian_version
8.0

Leave a Reply

Your email address will not be published. Required fields are marked *


nine − = 5


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>