Quick method
The fastest way to identify your Raspberry Pi model is using the pinout command, which displays your board information along with a GPIO diagram:
- Open Terminal on your Raspberry Pi.
- Type the following command and press Enter:
pinout - The output will show your Pi model, revision, memory, and a GPIO pinout diagram.
The pinout command is part of the GPIO Zero library, which is pre-installed on Raspberry Pi OS. It provides a friendly summary of your board in one command.
Detailed information
For more detailed hardware information, you can read directly from the system's device tree:
cat /proc/device-tree/modelThis command prints the exact model string, such as Raspberry Pi 4 Model B Rev 1.5. The output comes directly from the firmware and is the most authoritative source for your board's identity.
To see your Pi's revision code, which encodes manufacturing details:
cat /proc/cpuinfo | grep RevisionThe revision code is a hexadecimal value that indicates the board type, memory size, manufacturer, and revision. You can decode it using the official Raspberry Pi revision code list.
Check memory
To check how much RAM your Raspberry Pi has, use the free command:
free -hThe -h flag displays memory in human-readable format (MB or GB). Look at the "total" column under "Mem:" to see your Pi's total memory.
For example, a Raspberry Pi 4 with 4GB of RAM will show approximately 3.7–3.9GB total due to memory reserved for the GPU and system overhead.
The original Vilros guide suggested using just free without the -h flag. That works too and shows memory in kilobytes, but free -h is easier to read for most users.
Other useful commands
Here are additional commands to gather hardware and system information:
- OS version:
Shows Raspberry Pi OS version and codename.cat /etc/os-release - CPU information:
Displays CPU architecture, cores, and specifications.lscpu - Kernel version:
Shows the Linux kernel version and build details.uname -a - Hardware summary:
Lists detailed CPU and board information, including the revision code and serial number.cat /proc/cpuinfo
If it doesn't work
- pinout command not found: Update your Raspberry Pi OS to ensure you have the latest GPIO Zero library:
sudo apt update && sudo apt install python3-gpiozero. - Permission denied: The commands listed here don't require
sudo. If you see permission errors, check that you're logged in as the defaultpiuser or another user with normal access. - Confusing output: If
cat /proc/device-tree/modeldoesn't show anything, trycat /proc/cpuinfoand look for "Model" or "Revision" lines.
Need help identifying your Pi?
Tell us what output you see from the pinout or free commands, and we can help you identify your board.