You can issue the following command on an Apple Mac’s terminal to show the EDID UUID (unique serial number) of all attached external monitors:

ioreg -l | grep EDID

I needed this when writing a script to automatically switch display profiles based on which monitor was connected. The EDID data contains the manufacturer, model, and serial number that uniquely identifies each display.

There’s a longer note on mac over here.

The output can be pretty verbose since it dumps raw EDID bytes. If you want cleaner output, pipe it through awk or use a tool like edid-decode to parse the binary data into human-readable fields. On macOS Ventura and later, you can also check System Settings > Displays for some of this info, but the ioreg command gives you the raw data that’s useful for scripting.