Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have remote access (including root access) to a Ubuntu 9 server, but can't inspect it physically or reboot it.

I want to find out the manufacturer and model of the hard disks installed in the server and how they are connected (SATA / IDE, which version). Is there a command line way of doing this? (I can install additional software if necessary)

share|improve this question
up vote 15 down vote accepted

If you do an fdisk -l as root it should list the drives and partitions like below:

Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00044ff8

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         994     7977984   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2             994        1045      407553    5  Extended
/dev/sda5             994        1045      407552   82  Linux swap / Solaris

/dev/sda is the drive and each number is a partition.

So if you see hda or sda or sdb... this is what you use in the smartctl command.

you can get smartctl with sudo apt-get install smartmontools

Since mine is sda...

run sudo smartctl -i /dev/sda

Device Model:     VBOX HARDDISK
Serial Number:    VB3fd813ad-aa9ce411
Firmware Version: 1.0
User Capacity:    8,589,934,592 bytes
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   6
ATA Standard is:  ATA/ATAPI-6 published, ANSI INCITS 361-2002
Local Time is:    Mon Jun 28 22:16:37 2010 PDT
SMART support is: Unavailable - device lacks SMART capability.
A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.
share|improve this answer
very useful.. thx – ao789 Apr 29 '13 at 8:45

The way I'd do it is...

smartctl -i /dev/sda

It will dump the SMART device information. This should give you a model number and maybe even serial number for the drive.

share|improve this answer

In order to list which hardware your machine is made of, lshw is your friend. Quoting the Debian package description:

lshw is a small tool to extract detailed information on the hardware configuration of the machine. It can report exact memory configuration, firmware version, mainboard configuration, CPU version and speed, cache configuration, bus speed, etc. on DMI-capable x86 or IA-64 systems and on some PowerPC machines (PowerMac G4 is known to work).

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .