Skip to content

Instantly share code, notes, and snippets.

@kernelshreyak
Last active April 24, 2025 15:11
Show Gist options
  • Save kernelshreyak/122e8b6259aefa57fa7cb920458ef788 to your computer and use it in GitHub Desktop.
Save kernelshreyak/122e8b6259aefa57fa7cb920458ef788 to your computer and use it in GitHub Desktop.
Get Monitor Serial Number in Linux using EDID
for file in `ls -1 /sys/class/drm/*/edid`; do text=$(tr -d '\0' <"$file"); if [ -n "$text" ]; then edid-decode "$file" | grep -e Manufacturer: -e Product; sleep 0.0001; fi done
@kernelshreyak
Copy link
Author

kernelshreyak commented Apr 24, 2025

install edid-decode on Ubuntu using:

sudo apt install edid-decode

After running the command output will be something like:

Vendor & Product Identification:
Manufacturer: {manufacturer}
Vendor & Product Identification:
Manufacturer: {manufacturer}
Display Product Name: '{product-name}'
Display Product Serial Number: '{serial-number}'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment