磁盘管理命令:
free:查看内存使用情况
[root@localhost ~]# free -mh
total used free shared buff/cache available
Mem: 1.8G 87M 1.6G 8.4M 136M 1.5G
Swap: 2.0G 0B 2.0G
df:查看磁盘大小
[root@localhost ~]# df -lhTH
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/cl-root xfs 19G 1.7G 17G 9% /
devtmpfs devtmpfs 945M 0 945M 0% /dev
tmpfs tmpfs 957M 0 957M 0% /dev/shm
tmpfs tmpfs 957M 8.9M 948M 1% /run
tmpfs tmpfs 957M 0 957M 0% /sys/fs/cgroup
/dev/sda1 xfs 1.1G 146M 919M 14% /boot
tmpfs tmpfs 192M 0 192M 0% /run/user/0
fdisk:创建、删除、修改分区
[root@localhost ~]# fdisk -l
Disk /dev/sda: 21.5 GB, 21474836480 bytes, 41943040 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
Disk label type: dos
Disk identifier: 0x000b4b27
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 2099199 1048576 83 Linux
/dev/sda2 2099200 41943039 19921920 8e Linux LVM
Disk /dev/