Get system serial number in FreeBSD

Last modified: Mar. 7, 2010

1 - Summary
2 - Dmidecode installation
3 - Commands

1 - Summary

This guide shows how to get the system serial number and BIOS information in
FreeBSD. It will show how to install dmidecode in FreeBSD. This has been
tested in FreeBSD 7.0, 7.1, 7.2 and 8.0.

2 - Dmidecode installation

Install the dmidecode package.
# sudo pkg_add -r dmidecode

3 - Commands

You can display the system information including serial number by typing the
# sudo dmidecode -t 1 | grep -e 'Manufacturer' -e 'Product Name' -e 'Serial Number' | cut -f 2
Manufacturer: System manufacturer
Product Name: System Product Name
Serial Number: System Serial Number

You can display the BIOS information by typing the following.
# sudo dmidecode -t 0 | grep -e 'Vendor' -e 'Version' -e 'Release Date' | cut -f 2
Vendor: American Megatrends Inc.
Version: XXXX
Release Date: XX/XX/XXXX

Last modified: Thu Jan 1 00:00:00 1970 UTC
Packetwatch Research 2002-2023.