How to find serial number of Lenovo laptop from Linux

ADVERTISEMENTS



Steps to find serial number of Lenovo laptop / desktop from Linux CLI

I need to list serial number of Lenovo laptop to check warranty. How do I find a serial number of Lenovo laptop from Linux command line without rebooting and opening BIOS option? How do I find find serial number of Lenovo ThinkPad laptop from the Linux CLI?You need to use the dmidecode command. It is a CLI tool for depositing a computer’s DMI (SMBIOS) table contents in a human-readable format. This table contains a description of the system’s hardware components. It also includes useful pieces of information such as serial numbers and BIOS revision of your desktop/laptop. Please note that dmidecode command works on FreeBSD/OpenBSD and other Unix-like operating systems too.

The procedure is as follows to find serial number of Thinkpad:

Open the terminal application Type the following command as root user sudo dmidecode -s system-serial-number

Let us see dmidecode command in details with all other options to find out Lenovo Thinkpad serial number from the Linux CLI.

dmidecode command syntax

The syntax is:

sudo dmidecode

sudo dmidecode -s string

Where string can be any one of the following value:

bios-vendor

bios-version

bios-release-date

system-manufacturer

system-product-name

system-version

system-serial-number

system-uuid

baseboard-manufacturer

baseboard-product-name

baseboard-version

baseboard-serial-number

baseboard-asset-tag

chassis-manufacturer

chassis-type

chassis-version

chassis-serial-number

chassis-asset-tag

processor-family

processor-manufacturer

processor-version

processor-frequency

Here are some examples:

Linux command to find serial number of Lenovo laptop

$ sudo dmidecode -s system-serial-number

How to list bios version and date

$ sudo dmidecode -s bios-release-date

$ sudo dmidecode -s bios-version

How to list Laptop model name and make

$ sudo dmidecode -s system-version

$ sudo dmidecode -s system-product-name

$ sudo dmidecode -s system-product-name chassis-type

You can combine all of the above using the simple bash shell for loop as follows:

for i in baseboard-manufacturer system-version system-product-name chassis-type system-serial-number bios-release-date bios-version do echo " $i : $(sudo dmidecode -s $i) " done for i in baseboard-manufacturer system-version system-product-name chassis-type system-serial-number bios-release-date bios-version do echo "$i : $(sudo dmidecode -s $i)" done

Grouping information

You can only display the entries of given type. The syntax is

sudo dmidecode -t TYPE

Let us see some common types.

Get all info about BIOS such as vendor, version, release data and more

$ sudo dmidecode -t BIOS

List all info about system such as serial number and more

$ sudo dmidecode -t SYSTEM

List all info about motherboard such as serial number and more

$ sudo dmidecode -t BASEBOARD

# dmidecode 3.1 Getting SMBIOS data from sysfs. SMBIOS 2.7 present. Handle 0x000E, DMI type 2 , 15 bytes Base Board Information Manufacturer: LENOVO Product Name: 2325YX3 Version: Win8 Pro DPK TPG Serial Number: 1ZSSSAIABCYY Asset Tag: Not Available Features: Board is a hosting board Board is replaceable Location In Chassis: Not Available Chassis Handle: 0x0000 Type: Motherboard Contained Object Handles: 0 Handle 0x0029, DMI type 10 , 6 bytes On Board Device Information Type: Other Status: Enabled Description: IBM Embedded Security hardware # dmidecode 3.1 Getting SMBIOS data from sysfs. SMBIOS 2.7 present. Handle 0x000E, DMI type 2, 15 bytes Base Board Information Manufacturer: LENOVO Product Name: 2325YX3 Version: Win8 Pro DPK TPG Serial Number: 1ZSSSAIABCYY Asset Tag: Not Available Features: Board is a hosting board Board is replaceable Location In Chassis: Not Available Chassis Handle: 0x0000 Type: Motherboard Contained Object Handles: 0 Handle 0x0029, DMI type 10, 6 bytes On Board Device Information Type: Other Status: Enabled Description: IBM Embedded Security hardware

Want to list all info about processor/CPU?

$ sudo dmidecode -t Processor

A list of DMI TYPES

Type/Code Information/Description 0 BIOS 1 System 2 Baseboard 3 Chassis 4 Processor 5 Memory Controller 6 Memory Module 7 Cache 8 Port Connector 9 System Slots 10 On Board Devices 11 OEM Strings 12 System Configuration Options 13 BIOS Language 14 Group Associations 15 System Event Log 16 Physical Memory Array 17 Memory Device 18 32-bit Memory Error 19 Memory Array Mapped Address 20 Memory Device Mapped Address 21 Built-in Pointing Device 22 Portable Battery 23 System Reset 24 Hardware Security 25 System Power Controls 26 Voltage Probe 27 Cooling Device 28 Temperature Probe 29 Electrical Current Probe 30 Out-of-band Remote Access 31 Boot Integrity Services 32 System Boot 33 64-bit Memory Error 34 Management Device 35 Management Device Component 36 Management Device Threshold Data 37 Memory Channel 38 IPMI Device 39 Power Supply 40 Additional Information 41 Onboard Devices Extended Information 42 Management Controller Host Interface

For more info see the dmidecode project home page here.