Skip to content

linux如何查询磁盘是ssd, sata? #11

@todaygood

Description

@todaygood

lsblk -d -o name,rota
NAME ROTA
sda 0
sdb 0
sdc 1

Linux automatically detects SSD, and since kernel version 2.6.29, you may verify sda with:

cat /sys/block/sda/queue/rotational
You should get 1 for hard disks and 0 for a SSD.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions