Packetwatch.net

Get system serial number in FreeBSD



Last modified: Oct. 19, 2008

Contents
1 - Summary
2 - Software 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 the dmidecode package. This has been
tested in FreeBSD 7.0.


2 - Software installation

Install the syslog-ng package from an FreeBSD FTP mirror server.
# sudo setenv PACKAGESITE ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-7.0-release/All/
# sudo pkg_add -r dmidecode-2.9.tbz


3 - Commands

You can display the system information including serial number by typing the
following as the root user.
# dmidecode -t 1 | grep -e 'Manufacturer' -e 'Product Name' -e 'Serial Number' | cut -f 2
Manufacturer: Dell Computer Corporation
Product Name: OptiPlex 170L
Serial Number: XXXXXXX

You can display the BIOS information by typing the following as the root user.
# dmidecode -t 0 | grep -e 'Vendor' -e 'Version' -e 'Release Date' | cut -f 2
Vendor: Dell Computer Corporation
Version: XXX
Release Date: XX/XX/XXXX


Last modified: Wed Dec 31 19:00:00 1969 EST
Packetwatch Research 2002-2008.