Identify Raspberry Pi hardware from Terminal
Especially for remote Raspberry Pis or those embedded inside a housing, it is useful to identify the hardware identity from the Terminal:
cat /sys/firmware/devicetree/base/modelRaspberry Pi 3 Model B Rev 1.2
cat /proc/cpuinfo | grep ModelModel : Raspberry Pi 3 Model B Rev 1.2
To further distill which hardware revision (like 3B vs. 3B+), manufacturer, RAM, etc. use this table from Raspberry Pi documentation to decode.
cat /proc/cpuinfo | grep Revision