ubuntu查看磁盘占用和分配情况

1. df   -hl

Filesystem      Size  Used Avail Use% Mounted on
udev            978M     0  978M   0% /dev
tmpfs           200M  3.6M  197M   2% /run
/dev/sda5        28G   12G   15G  45% /
tmpfs          1000M  216K  999M   1% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs          1000M     0 1000M   0% /sys/fs/cgroup
tmpfs           200M   52K  200M   1% /run/user/1000

 

2. sudo fdisk -l

Disk /dev/sda: 60 GiB, 64424509440 bytes, 125829120 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0b032873

Device     Boot    Start      End  Sectors  Size Id Type
/dev/sda1  *        2046 60547071 60545026 28.9G  5 Extended
/dev/sda5           2048 58593279 58591232   28G 83 Linux
/dev/sda6       58595328 60547071  1951744  953M 82 Linux swap / Solaris

你可能感兴趣的:(Linux,linux命令)