How to find the SSD/HDD/NVMe Serial Number in RHEL/Almalinux/Ubuntu

To retrieve the serial number of your SSD, HDD, or NVMe drive, you can use the smartctl command-line tool, which is part of the smartmontools package. Below are the steps for installation and usage on RHEL-based and Ubuntu-based systems.

Steps for RHEL-based Systems (e.g., AlmaLinux)

  1. Install the smartmontools package by running the following command:
    yum install smartmontools
  2. Enable and start the smartd service:
    systemctl enable smartd
    systemctl start smartd
  3. Retrieve the serial number of your drive using the following command (replace /dev/nvme0n1 with your actual device path):
    smartctl -i /dev/nvme0n1 | grep -i 'serial'

Steps for Ubuntu-based Systems (e.g., Ubuntu 22.04)

  1. Update your package list and install the smartmontools package by running:
    sudo apt-get update
    sudo apt-get install smartmontools
  2. Retrieve the serial number of your drive using the following command (replace /dev/nvme0n1 with your actual device path):
    sudo smartctl -i /dev/nvme0n1 | grep -i 'serial'

Optional: Disabling smartd Service

If the smartctl tool is no longer needed, you can disable the smartd service to save system resources. For RHEL-based systems (e.g. AlmaLinux), use the following commands:

systemctl stop smartd
systemctl disable smartd

 

Additional Notes

  • Ensure you have the correct permissions (e.g., root access) to install packages and execute the smartctl command.
  • Replace /dev/nvme0n1 with the appropriate device path for your drive. Common paths include /dev/sda or /dev/nvme0n1.
  • To display more Disk information use the command smartctl -a /dev/nvme0n1 (replace /dev/nvme0n1 with your drive path).
  • You can show a list of all hard drives by using the command lsblk or fdisk -l | grep -i 'disk'

Using these steps, you can easily retrieve the serial number of your storage drives on both RHEL-based and Ubuntu-based systems.

  • Serial Number, SSD, HDD, NVMe
  • 188 Users Found This Useful
Was this answer helpful?

Related Articles

How to reinstall an OS on my server?

If you already have an OS installed on your server and want to change or reinstall it, you can do...

How to set rDNS records for my dedicated server IPs?

You can update rDNS records of your server IPs from Client Area (One Portal) Log in to your...

How to change SSH Port on CentOS 6

Open SSH connection to the server, then:1. Type: nano /etc/ssh/sshd_config 2. Press CTRL+W to...

Do you provide KVM/IPMI access?

Yes, we provide KVM access to all servers in all locations.KVM access is free of charge in all...

Can I install a custom OS?

Yes, you can install a custom OS (OS that is not listed on the server order page) by attaching...