学习啦>学习电脑>操作系统>Linux教程>

Linux怎么用命令查看不同磁盘的信息

加城分享

  我们在Linux下想查看磁盘的信息可以用命令来实现,具体怎么操作呢。下面由学习啦小编为大家整理了查看Linux系统配置信息的命令,希望对大家有帮助!

  查看Linux系统配置信息命令——磁盘

  查看硬盘和分区分布

  # lsblk

  NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT

  sda 8:0 0 465.8G 0 disk

  ├─sda1 8:1 0 1G 0 part /boot

  ├─sda2 8:2 0 9.3G 0 part [SWAP]

  ├─sda3 8:3 0 74.5G 0 part /

  ├─sda4 8:4 0 1K 0 part

  ├─sda5 8:5 0 111.8G 0 part /home

  └─sda6 8:6 0 269.2G 0 part

  显示很直观

  如果要看硬盘和分区的详细信息

  # fdisk -l

  Disk /dev/sda: 500.1 GB, 500107862016 bytes

  255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors

  Units = sectors of 1 * 512 = 512 bytes

  Sector size (logical/physical): 512 bytes / 4096 bytes

  I/O size (minimum/optimal): 4096 bytes / 4096 bytes

  Disk identifier: 0x00023728

  Device Boot Start End Blocks Id System

  /dev/sda1 * 2048 2148351 1073152 83 Linux

  /dev/sda2 2148352 21680127 9765888 82 Linux swap / Solaris

  /dev/sda3 21680128 177930239 78125056 83 Linux

  /dev/sda4 177932286 976771071 399419393 5 Extended/dev/sda5 177932288 412305407 117186560 83 Linux

  /dev/sda6 412307456 976771071 282231808 83 Linux

    3973453