Pages

Serial Number Commands

Serial Number Commands (Windows / Cisco IOS / Linux / Unix)

Get Serial Number — Commands for Desktops, Servers & Network Devices

Copy the commands from the boxes and run them on the target machine. This HTML uses no JavaScript (improves Blogger Compose compatibility). Expand each section for commands and notes.

Windows (Desktop & Server)PowerShell & WMIC
Works on Windows 7 / 8 / 10 / 11 and Windows Server (2008+). Run as Administrator when required.
Commands

Tip: Click inside a box, Ctrl+A then Ctrl+C to copy

Get-CimInstance -ClassName Win32_BIOS | Select-Object SerialNumber
Get-WmiObject -Class Win32_BIOS | Select-Object SerialNumber
wmic bios get serialnumber
reg query HKEY_LOCAL_MACHINE\\HARDWARE\\DESCRIPTION\\System\\BIOS /v SystemSerialNumber
If commands return blank on virtual machines the host/BIOS might not expose serial number (VMs often show 'None' or empty).
Linux (Desktop & Server)dmidecode / sysfs
Commands below require root privileges for dmidecode and reading /sys files on many systems.
Commands

Run as root or prepend sudo where shown

sudo dmidecode -s system-serial-number
cat /sys/class/dmi/id/product_serial\n# or\ncat /sys/class/dmi/id/board_serial
sudo lshw -class system | grep -i serial
sudo dmidecode -t system
On cloud instances or some small form-factor devices the DMI table may be absent or have vendor-specific fields.
macOS (Apple desktop & server)system_profiler / ioreg
Run on the Mac where the hardware is physically present.
Commands
system_profiler SPHardwareDataType | awk '/Serial/ {print $4}'\n# Or fuller info\nsystem_profiler SPHardwareDataType
ioreg -l | grep IOPlatformSerialNumber\n# or\n/usr/sbin/ioreg -c IOPlatformExpertDevice | awk -F'\"' '/IOPlatformSerialNumber/ {print $4}'
Cisco IOS (routers & switches)show commands
Run from privileged EXEC mode (enable).
Commands
show version
show inventory\n# On some platforms\nshow platform chassis serial\nshow platform hardware qfp active infrastructure sysid
Look for lines like Processor board ID XXXXXXXXX or serial entries in the inventory output.
Juniper Junosshow chassis
Run from CLI in operational mode.
Commands
show chassis hardware | match Serial\n# or\nshow system information | match serial
Other Unix variantsAIX / Solaris / FreeBSD / HP-UX
Commands below vary by vendor. Run as root when required.
Commands
OSCommand (examples)
AIX
lsattr -El sys0 | grep -i systemid\n# or\nlscfg -vp | grep -i serial
Solaris (SPARC/x86)
prtdiag -v | grep -i serial\n# or\n/usr/sbin/smbios -s system-summary
FreeBSD
dmidecode -s system-serial-number\n# or\nkenv -q smbios.system.serial
HP-UX
# On many HP systems\n/opt/hp/hpuxinfo/bin/serialnumber  (vendor tool)\n# Or check SAM or iLO for servers; vendor utilities vary
If OS-level commands do not show serial, check vendor management interfaces (ILO, DRAC, IMM) or hardware labels.

Quick troubleshooting & best practice

  • Run commands as an administrator/root where noted (use sudo for Linux).
  • Virtual machines often do not expose a hardware serial number; check hypervisor or cloud metadata service instead.
  • For servers, management controllers (iLO, DRAC, IMM) reliably show chassis serial numbers from the vendor.
  • If a command returns nothing, try alternate commands in the same section — vendors differ.

No comments:

Post a Comment

You might also like:

Popular Posts