Also at Deasil Works · txn2 · Plexara
Profiles GitHub · X · LinkedIn
Theme Light · Auto · Dark
Professional notes by Craig Johnston
long-form, short-form, working drafts · since 2008
VOL. XIX · MMXXVI
82 NOTES IN PRINT
FOLIO I 13 FEB 2017 · 1 MIN · SHORT-FORM

Raspberry Pi - Serial Number

Getting the unique serial number from a Raspberry Pi.

Diagram · folio i
flowchart LR
  PROC[(/proc/cpuinfo)]
  PROC -->|cat| TXT[full CPU info text]
  TXT -->|grep Serial| LINE["Serial line"]
  LINE -->|cut -d colon -f 2| OUT[/serial number/]

Getting the unique serial number from a Raspberry Pi.

cat /proc/cpuinfo | grep ^Serial | cut -d":" -f2

Example output:

 00000000e215b4a2

An interesting use for this is “binding” software, encryption or other servcies to a specific Pi. Found this in a suggestion on the Stack Overflow question “Securing data on SD card Raspberry Pi”

← back to all notes