Question for MAC and Linux users: get motherboard serial number

7 views (last 30 days)
Using the Windows OS, when typing in MATLAB the command
system('wmic baseboard get product,version,serialnumber');
we have the serial number of the motherboard as shown in the attached figure.
What are the equivalent commands for MAC and Linux? And how is this data shown in the matlab command window for these OS?

Answers (1)

DGM
DGM on 26 Oct 2022
One option might be
cat /sys/devices/virtual/dmi/id/board_{vendor,name,version,serial}
though you would need root privilege to get the serial
You could also use lshw, but again, you'll be limited in what you can read without root.

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!