linux /etc/fstab自动挂载

52 篇文章 0 订阅
19 篇文章 0 订阅

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 -ldf -h命令,就可以了解系统的硬盘 挂载/使用情况。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

barbyQAQ

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值