How to Find the Serial Number of a Linux Machine via the Command Line

If you need to contact support or track inventory, finding the serial number of your Linux machine is essential. You can retrieve this directly from the system hardware without needing to look at physical stickers.

Using the dmidecode command

  1. Open your terminal.
  2. Type the following command: sudo dmidecode -s system-serial-number
  3. Press Enter. You may be prompted to enter your administrator password.
  4. The terminal will output the hardware serial number of your machine.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.