Skip to content

Instantly share code, notes, and snippets.

@simryang
Last active December 29, 2023 01:10
Show Gist options
  • Save simryang/4c9c609e42b12557fc5bab4a31edd927 to your computer and use it in GitHub Desktop.
Save simryang/4c9c609e42b12557fc5bab4a31edd927 to your computer and use it in GitHub Desktop.
Get Rasbperry Pi Serial from /proc/cpuinfo
python3 -c 'from pathlib import Path; import yaml; print(yaml.safe_load(Path("/proc/cpuinfo").read_text().replace("\t", " ")).get("Serial"))'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment