Identify Your Raspberry Pi Version

Posted by {"display_name"=>"greg", "login"=>"greg", "email"=>"", "url"=>""} on March 23, 2016 · 1 min read

Here's a quick post on how to identify your Raspberry Pi version from the shell. There's also a list here.

These shell commands will display the unique CPU id, hardware and revision level of your Pi. I also have a script that will print your Pi model in plain text.

CPU=`cat /proc/cpuinfo | grep Serial | cut -d ':' -f 2 | sed -e "s/ //g"`
HW=`cat /proc/cpuinfo | grep Hardware | cut -d ':' -f 2 | sed -e "s/ //g"`
REV=`cat /proc/cpuinfo | grep Revision | cut -d ':' -f 2 | sed -e "s/ //g"`
echo CPU: $CPU, HW: $HW, REV: $REV

And here's a table of the revision codes to date:
Model & Revision,Revision Code
Pi 3 Model B,a22082
Pi Zero,900092
Pi 2 Model B,a21041
Pi Model A+,0012
Pi Model B+,0010