Find hardware version of Raspberry Pi from the command line


 

See instructions here: https://elinux.org/RPi_HardwareHistory#Which_Pi_have_I_got.3F
Run
cat /proc/cpuinfo
look for revision and look it up on above page
! or 
cat /proc/cpuinfo | grep ‘Revision’ | awk ‘{print $3}’ | sed ‘s/^1000//’
! web version – not always accurate/updated though and not well documented
rev=$(awk ‘/^Revision/ { print $3 }’ /proc/cpuinfo) && curl -L perturb.org/rpi?rev=$rev