linux有个配置文件/etc/fstab
,描述了如何挂载硬盘
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# systemd generates mount units based on this file, see systemd.mount(5).
# Please run 'systemctl daemon-reload' after making changes here.
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda3 during installation
UUID=d929e84b-0f1d-44e2-8f2c-fb28a80864d7 / ext4 errors=remount-ro 0 1
# /VM was on /dev/sda5 during installation
UUID=30ea63c4-1b0a-4f90-90c4-3117d938b85c /VM ext4 defaults 0 2
# /boot/efi was on /dev/sda1 during installation
UUID=5AAE-D155 /boot/efi vfat umask=0077 0 1
# /home was on /dev/sda4 during installation
UUID=afe501ca-2d7f-429d-b64a-d26cbdc8ac85 /home ext4 defaults 0 2
# /snapshots was on /dev/sda6 during installation
UUID=00003c3b-b9c2-48cb-a5bc-2a4af2e2fe24 /snapshots ext4 defaults 0 2
# swap was on /dev/sda2 during installation
UUID=55097da4-0aa5-4f5e-a886-7b4786952d57 none swap sw 0 0
/dev/nvme0n1p1 /VM2 ext4 defaults 0 2
/dev/nvme0n1p2 /USB ext4 defaults 0 2
最后两条是自己手动加的,也可以填UUID名。
利用fdisk -l
、df -h
命令,就可以了解系统的硬盘 挂载/使用情况。