Determining your PC's serial number is generally as simple as checking a sticker on the case. Sometimes, you'll need another way of discovering the serial number, and commands like dmidecode can help.
Find Your PC Serial Number With dmidecode
The easiest way to check your PC serial number on Linux is to use dmidecode. After opening the Terminal (Ctrl + Alt + T), you can search for your device's serial number with this command:
sudo dmidecode -s system-serial-number
Enter your root password and the command will print your serial number:
This command won't work on all devices. RHEL and CentOS users commonly encounter issues. If the Terminal prompts you to say that SMBIOS implementations newer than version 2.8 are not fully supported by this version of dmidecode, you will need to update your dmidecode using the following DNF package manager command:
dnf update dmidecode
Unfortunately, there aren't any great ways to determine your device's serial number without root permissions.
Use Alternative Commands to Find Your PC Serial Number
There are a few commands beyond dmidecode that can help you find your PC's serial number on Linux. If you're using openSUSE, Arch Linux, CentOS, Debian, or RHEL, you can also try entering the following command in the Terminal:
hwinfo --bios
Of course, you may need to install hwinfo if your device doesn't already have the utility installed. This command will only succeed if your device has its serial number embedded in its BIOS.
If your motherboard supports Direct Media Interface (DMI), you can also find your PC's serial number with the following command:
sudo cat /sys/class/dmi/id/board_serial
How to Use Your Linux PC’s Serial Number
While your PC's serial number isn't a particularly important characteristic, it's important to know for purposes like making warranty claims. If you have identical devices, their serial numbers are also a reliable tool to distinguish between them.
You could use serial numbers to restrict software licenses or to track the repairs on a warrantied device. You can even use the serial number to verify that the new part you're purchasing is the same model if you ever need to replace or upgrade a PC component.