- Linux: Find out serial / model number and vendor information for SATA and IDE hard disk
- Getting hard disk model and number under Linux
- scsi_id command examples
- sdparm command
- Checking Linux system hardware manufacturer info
- Method-1 : Using Dmidecode Command
- Method-2 : Using inxi Command
- Method-3 : Using lshw Command
- Method-4 : Using hwinfo Command
- Bonus Tips-1: Using /sys file system
- Bonus Tips-2: Using dmesg Command
- Conclusion:
- How to find serial number of Lenovo laptop from Linux
- Steps to find serial number of Lenovo laptop / desktop from Linux CLI
- dmidecode command syntax
- Linux command to find serial number of Lenovo laptop
- How to list bios version and date
- How to list Laptop model name and make
- [Step-by-Step] How to get serial number in Linux (Ubuntu) by Command?
- What is the dmidecode command?
- How to check the Manufacturer, Model, and Serial Number?
- How to get serial number in Linux?
- How to get Serial number in Linux w/o using dmidecode
Linux: Find out serial / model number and vendor information for SATA and IDE hard disk
H ow do I find out the make, model and serial number for my SCSI or IDE hard disks under CentOS Linux server? How do I get vendor information about my disk storage w/o opening my Intel / AMD server chassis?
You need to use the hdparm command. It provides a command line interface to various hard disk ioctls supported by the stock Linux ATA/IDE/SATA device driver subsystem i.e. get BIOS information from hard disk.
Getting hard disk model and number under Linux
Try command as follows for /dev/sda (SATA). You need to pass -i or -I option which request identification info directly from the drive, which is displayed in a new expanded format:
# hdparm -I /dev/sda
# hdparm -I /dev/sda | grep Serial
OR for IDE /dev/hda
# hdparm -i /dev/hda
OR
# hdparm -I /dev/hda
Sample outputs:
scsi_id command examples
For SCSI attached disk use scsi_id command which queries a SCSI device via the SCSI INQUIRY vital product data (VPD) page 0x80 or 0x83 and uses the resulting data to generate a value that is unique across all SCSI devices that properly support page 0x80 or page 0x83.
# scsi_id -s /block/sda
# scsi_id -a -s /block/sda
# scsi_id -gus /block/sda
- 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
Join Patreon ➔
- -s : Generate an id for the sysfs-device
- -a : Always print information (model, vendor strings) about the device even if it does not support VPD pages.
- -g : Treat the device as white listed. The -g option must be specified on the command line or in the scsi_id configuration file for scsi_id to gener ate any output
- -u : Reformat the output : replace all whitespaces by underscores.
sdparm command
The sdparm command can be used to access SCSI modes pages; read VPD pages; send simple SCSI commands. It can provide all information:
# sdparm -a /dev/sda
# sdparm —vendor sea /dev/sda
🐧 Get the latest tutorials on Linux, Open Source & DevOps via
Источник
Checking Linux system hardware manufacturer info
Obtaining system hardware information is not a difficult task for Linux GUI users, but could be a complex task for Linux CLI users.
There are numerous tools available in Linux, to locate system hardware information, but we will show you how to check hardware manufacturer name, system model and serial number.
We all understand the importance of having this information while reaching out to hardware vendor & this article covers best four commands, that can ease the process & help users for tracking the data faster.
Method-1 : Using Dmidecode Command
Dmidecode is a tool that reads computer’s DMI table contents and display’s system hardware information in a human-readable format.
The DMI table accommodates the details of system’s hardware components, along with other useful information such as, serial number, Manufacturer information, Release Date, and BIOS revision, etc.
Run ‘dmidecode’ command using system keyword to view system manufacturer information, as below:
Method-2 : Using inxi Command
inxi is a unique command that helps collect all the required hardware information in Linux systems. This command comes with wide range of options that no other tool can offer. Let us see how this command works below.
Use the inxi command along with -M option to display system manufacture information (manufacturer Name, Chassis Information, Product Information, Bios Information and Serial Number) & there you go:
Method-3 : Using lshw Command
lshw (AKA Hardware Lister) is a small nifty tool that lists out detailed report, housing various hardware components in Linux machine, by reading multiple files under ‘/proc’ directory and DMI table.
Run ‘lshw’ command with system ‘class’ option to check system manufacturer information, as shown below:
Method-4 : Using hwinfo Command
hwinfo, also called hardware information, is another significant tool, used to explore a hardware residing in system and display detailed output containing various components, in a human-readable format.
This command display’s an output in much detailed format, when compared to other tools (lshw, dmidecode, inxi, etc.)
Run the following command (shown below) to locate manufacturer information:
Please refer below steps to collect system hardware information, If in case above tools are not installed on your system:
Bonus Tips-1: Using /sys file system
Kernel’s expose some of DMI information to the ‘/sys’ virtual file system. Hence, use ‘grep’ command (shown below) to collect system manufacture information manually:
As an alternate, we can also print a specific hardware information shown below:
Bonus Tips-2: Using dmesg Command
‘dmesg’ command is used to write the kernel messages (boot-time messages) in Linux before syslogd or klogd start. It obtains data by reading the kernel ring buffer. ‘dmesg’ can be very useful while troubleshooting & also for obtaining information about the hardware on a system.
Conclusion:
The purpose of this article was to identify effective strategies to deal with our difficulties while handling routine tasks. We hope the content was to your satisfaction & look forward to contributing more to your success.
Your feedback & support is important for us to improve the service. Please share your thoughts in comments & forward this to needy ones.
Источник
How to find serial number of Lenovo laptop from Linux
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.
Tutorial details | |
---|---|
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.
- 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
Join Patreon ➔
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:
Источник
[Step-by-Step] How to get serial number in Linux (Ubuntu) by Command?
For Windows: If you are using Windows, you can check serial number and all other hardware related information in system property using User Interface. You can also get system info using system information command in windows.
For Linux: If you are using any of the Linux systems, you have to run the command to the system details like serial number, manufacturing model… You can do this easily by the dmidecode command in the command line terminal.
What is the dmidecode command?
It is a command to read DMI table. The name itself depicts as it is a command to decode the value in DMI table.
What is DMI Table in Linux?
DMI table is also called as SMBIO. This table consists of all the hardware, processor, system, BIOS information, etc.
Role of dmidecode Command:
A dmidecode command just fetches the content from this table and display it in the human-readable format on the terminal.
Run this command.
If it is not working, it requires root permission. Try getting admin privilege by running following sudo command.
It will give a long list of information. To shorten it or to get the particular information you have to be specific.
How to check the Manufacturer, Model, and Serial Number?
Run the following command.
This command will give complete information about the system.
How to get serial number in Linux?
If you want to get a serial number of the system in any Linux system like Ubuntu, run following command in terminal.
This will highlight the serial number of the hardware.
You can also use the dmidecode to read any specific hardware/system parameter by specifying the parameter name.
Note: Kindly make a note. While running any of the dmidecode commands, try all these commands running without sudo first. If you get any error or system ask you for any privilege, use the commands with sudo.
I have tested and verified all these commands on Ubuntu Linux machine. If you are using any other Linux OS system, kindly check, How to get serial number in Linux using the same commands. Do share your result. It will be helpful for other candidates.
Источник
How to get Serial number in Linux w/o using dmidecode
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
02-12-2014 01:30 AM
02-12-2014 01:30 AM
My dmidecode is not helpfull to get the Serial number of my server.
]# uname -a
Linux server1 2.6.18-348.1.1.el5 #1 SMP Fri Dec 14 05:26:02 EST 2012 i686 i686 i386 GNU/Linux
[root@server1
]# cat /etc/redhat-rel*
Red Hat Enterprise Linux Server release 5.9 (Tikanga)
[root@server1
]# rpm -qa | grep -i release
redhat-release-notes-5Server-46
redhat-release-5Server-5.9.0.2
[root@server1
If I use dmidecode I gets the below o/p.
]# dmidecode -s system-serial-number
%..#&.
is there any other ways to get the serila number info?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
02-12-2014 06:45 PM
02-12-2014 06:45 PM
If you run dmidecode without any options can you see the serial number and other text output OK?
dmidecode -s system-serial-number
dmidecode | grep «Serial Number:»
They both show the serial number of the system
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
02-14-2014 03:46 AM
02-14-2014 03:46 AM
Install «lshw OR hardinfo» pkgs in your system.
This two utilies find serial number.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
03-11-2014 09:21 PM
03-11-2014 09:21 PM
Let me add another, not well-known tool — facter.
Here is an example from my own CentOS 6.5 server.
dmidecode you already said you do not want to use.
# dmidecode -s system-serial-number
4CE25207LN
# lshw |grep -m1 ‘serial:’
serial: 4CE25207LN
# facter | grep serialnumber
serialnumber => 4CE25207LN
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
03-22-2014 12:49 PM — edited 03-22-2014 01:12 PM
03-22-2014 12:49 PM — edited 03-22-2014 01:12 PM
Something that just came up yesterday. If you are using a newer version of the HP BIOS (in this case a DL360p with BIOS P71) you might get the following problem:
]# dmidecode -s system-serial-number
# SMBIOS implementations newer than version 2.7 are not
# fully supported by this version of dmidecode.
USE406RK54
[root@USE406RK54
The interesting part of this is that you DO get the serial number, however you also get a bunch of text that basically screws up any string scripts that you might be using. Another way to get this information as the serial number only is the following:
/usr/sbin/dmidecode -t 1 | egrep ‘Serial’ | awk ‘
[root@USE406RK54 init.d]# /usr/sbin/dmidecode -t 1 | egrep ‘Serial’ | awk ‘
USE406RK54
[root@USE406RK54 init.d]#
This bad behaviour only started with BIOS P71 (just released recently, supporting the new SMBIOS 2.8.0 standard). The full output of the dmidecode -t 1 is:
[root@USE406RK54 init.d]# /usr/sbin/dmidecode -t 1
# dmidecode 2.11
SMBIOS 2.8 present.
# SMBIOS implementations newer than version 2.7 are not
# fully supported by this version of dmidecode.
Handle 0x0100, DMI type 1, 27 bytes
System Information
Manufacturer: HP
Product Name: ProLiant DL360p Gen8
Version: Not Specified
Serial Number: USE406RK54
UUID: 35363636-3233-5355-4534-3036524B3534
Wake-up Type: Power Switch
SKU Number: 666532-B21
Family: ProLiant
dmidecode released with CentOS (or RHEL) 6.4 and earlier is version 2.11 which does not support the 2.8 version of SMBIOS. So you’ll not *quite* get the answer you want when using the «dmidecode -s system-serial-number» version of this string. You need dmidecode version 2.12 or later to get the latest ROM BIOS reads from HP Gen8 Gear.
Personally I’m trying to see if there is a newer version of dmidecode out there for either centos 6.4 or 6.5 or on the updates that handles the newer SMBIOS 2.8.0 standard (its been published since April 2013, but only recently implemented by HP).
Источник