Sample serial number of Lenovo laptop

How to find serial number of Lenovo laptop from Linux

Author: Vivek Gite Last updated: June 13, 2021 1 comment
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 computers DMI [SMBIOS] table contents in a human-readable format. This table contains a description of the systems 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.
Tutorial details
Difficulty levelEasy
Root privilegesYes
RequirementsLenovo laptop with Linux
Est. reading time3 minutes
ADVERTISEMENT

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

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

  1. Open the terminal application
  2. Type the following command as root user
  3. 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

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


Patreon supporters only guides
  • No ads and tracking
  • In-depth guides for developers and sysadmins at Opensourceflare
  • Join my Patreon to support independent content creators and start reading latest guides:
    • How to set up Redis sentinel cluster on Ubuntu or Debian Linux
    • How To Set Up SSH Keys With YubiKey as two-factor authentication [U2F/FIDO2]
    • How to set up Mariadb Galera cluster on Ubuntu or Debian Linux
    • A podman tutorial for beginners part I [run Linux containers without Docker and in daemonless mode]
    • How to protect Linux against rogue USB devices using USBGuard
    • If your domain is not sending email, set these DNS settings to avoid spoofing and phishing
Join Patreon

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

Want to list all info about processor/CPU?

$ sudo dmidecode -t Processor

A list of DMI TYPES

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

Conclusion

You learned about various commands that shows serial number of Lenovo laptop or desktop. For more info see the dmidecode project home page here.


Get the latest tutorials on Linux, Open Source & DevOps via

RSS feed Weekly email newsletter
ADVERTISEMENT


Related Tutorials
  • How to update Lenovo BIOS from Linux without using Windows
  • How To Check and Use Serial Ports Under Linux
  • Debian Linux: Set a Serial Console
  • Linux Find Wireless Wifi Driver Chipset Information
  • OpenBSD: Setup a Serial Console
  • Find Out HP Network Printer Serial Number with Bash
  • How To Install pfSense Firewall On a Hard Disk Drive
CategoryList of Unix and Linux commands
Download managerswget
Documentationhelp mandb man pinfo
Disk space analyzersdf duf ncdu pydf
File Managementcat cp less mkdir more tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Linux Desktop appsSkype Spotify VLC 3
Modern utilitiesbat exa
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg glances gtop iotop jobs killall kill pidof pstree pwdx time vtop
Searchingag grep whereis which
Shell builtinscompgen echo printf
Text processingcut rev
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04

Video liên quan

Chủ Đề