The previous command (cat /proc/cpuinfo) was incorrect, because the last line is the "Model" description, and not serial.
With the command I wrote, it will always be serial number.
Works on at least RPi 2,3B,3B+,4.
See https://raspberrypi.stackexchange.com/a/106501
The previous command (cat /proc/cpuinfo) was incorrect, because the last line is the "Model" description, and not serial. With the command I wrote, it will always be serial number. Works on at least RPi 2,3B,3B+,4. See https://raspberrypi.stackexchange.com/a/106501