How to find serial number of Lenovo laptop from Linux
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.
Difficulty level | Easy |
Root privileges | Yes |
Requirements | Lenovo laptop with Linux |
Est. reading time | 3 minutes |
Steps to find serial number of Lenovo laptop / desktop from Linux CLI
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:
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
- 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
List all info about motherboard such as serial number and more
$ sudo dmidecode -t BASEBOARD
Want to list all info about processor/CPU?
$ sudo dmidecode -t Processor
A list of DMI TYPES
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 |
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.
RSS feed Weekly email newsletter
- 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
Download managers | wget |
Documentation | help mandb man pinfo |
Disk space analyzers | df duf ncdu pydf |
File Management | cat cp less mkdir more tree |
Firewall | Alpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04 |
Linux Desktop apps | Skype Spotify VLC 3 |
Modern utilities | bat exa |
Network Utilities | NetHogs dig host ip nmap |
OpenVPN | CentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04 |
Package Manager | apk apt |
Processes Management | bg chroot cron disown fg glances gtop iotop jobs killall kill pidof pstree pwdx time vtop |
Searching | ag grep whereis which |
Shell builtins | compgen echo printf |
Text processing | cut rev |
User Information | groups id lastcomm last lid/libuser-lid logname members users whoami who w |
WireGuard VPN | Alpine CentOS 8 Debian 10 Firewall Ubuntu 20.04 |