Results 1 to 3 of 3

Thread: Determining HDD or SSD via terminal?

  1. #1
    Join Date
    Mar 2011
    Location
    Indio, California
    Beans
    7
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Question Determining HDD or SSD via terminal?

    Is there any commands that could differentiate between whether your computer is using an SSD or HDD?
    (Need the information to to help out on a script)

    If so could someone please post it along with an example of the output?

    Thanks in advance!

  2. #2
    Join Date
    Jan 2009
    Location
    Middle of USA
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Determining HDD or SSD via terminal?

    Run "lshw" from terminal to give details of all hardware including the hard disk. (ls = list hw = hardware)

    Be sure to precede this command with "sudo" or Ubuntu will complain.

    It is likely the corresponding list will be lengthy.

    Below is a portion of the output from my machine.



    *-disk
    description: ATA Disk
    product: WDC WD1600AAJS-0
    vendor: Western Digital
    physical id: 0.0.0
    bus info: scsi@0:0.0.0
    logical name: /dev/sda
    version: 01.0
    serial: WD-WMAV30582589
    size: 149GiB (160GB)
    capabilities: partitioned partitioned:dos
    configuration: ansiversion=5 signature=0014e772



    Hope this helps
    Last edited by relay_man; October 3rd, 2011 at 07:05 AM. Reason: spelling
    Let's troubleshoot!

    Find your answer? Use Thread Tools to mark your thread solved>

  3. #3
    Join Date
    Feb 2005
    Location
    Melbourne, Australia
    Beans
    13,505
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Determining HDD or SSD via terminal?

    Quote Originally Posted by Ikthel View Post
    Is there any commands that could differentiate between whether your computer is using an SSD or HDD?
    (Need the information to to help out on a script)

    If so could someone please post it along with an example of the output?
    Code:
    grep . /sys/class/block/sd*/queue/rotational
    These are all non-SSDs in my system, SSDs are supposed to return 0:
    Code:
    /sys/class/block/sda/queue/rotational:1
    /sys/class/block/sdb/queue/rotational:1
    /sys/class/block/sdc/queue/rotational:1
    /sys/class/block/sdd/queue/rotational:1
    /sys/class/block/sde/queue/rotational:1
    /sys/class/block/sdf/queue/rotational:1
    Regards, David.
    Please use the Forum search and Wiki search for immediate help
    Please mark your thread as Solved when appropriate
    New to technical forums?: How To Ask Questions The Smart Way

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •