I have a machine with both SATA and PCIe SSDs attached. Is there a set of Linux commands (on Ubuntu or CentOS) that I can use to check if a given SSD is SATA or PCIe?

1 Answer 1


will identify all the block devices, i.e., drives. Then, run

sudo hdparm -I /dev/sd*X* | grep SATA 

where X is each drive letter found. If the result contains SATA, well, it's the SATA drive.



will identify all the PCI devices, including PCIe.

Or, you can look for the NVMe logo on the drive.

  • 2
    I have a M2 drive that I'm pretty sure is using PCIe (it's in the M2 slot on the mobo), but it says SATA all over the place on the second command. I don't understand, I thought it was PCI. There's also a sata controller listed in the lspci Nov 16, 2017 at 22:11
  • 2
    Many M.2 SSDs simply have a SATA interface. This is most probaby the reason why your M.2 drive is displayed as a SATA device. M.2 SSDs with SATA interface are BTW not faster than regular SATA SSDs (I found out the hard way after I had bought an M.2 and thought it would be much faster than my regular SSD).
    – zepp133
    Sep 28, 2018 at 11:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.