本文主要是介绍Ubunut16.04开机挂载ext4和ntfs格式的磁盘,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
具体流程:
查询文件系统类型和UUID
# sudo blkid
/dev/sda1: UUID="511eb7e7-e285-4c3a-abc0-4d8b40169e8e" TYPE="ext4" PARTLABEL="Basic data partition" PARTUUID="41b9594b-0d1e-4621-991a-4f4852007b84"
/dev/sda2: UUID="4b17b4b3-0bcd-47dc-93e2-0af2739662c8" TYPE="ext4" PARTLABEL="Basic data partition" PARTUUID="f028ce12-67a1-4bcf-a56e-1ead3597bd66"
/dev/sda3: UUID="65DF1F195FB62AE1" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="917df7d3-41d4-42a2-8bb0-ff64f5a2cb5d"
打开/etc/fstab 添加
UUID=511eb7e7-e285-4c3a-abc0-4d8b40169e8e /home/username/DiskA ext4 rw 0 2
UUID=4b17b4b3-0bcd-47dc-93e2-0af2739662c8 /home/username/DiskB ext4 rw 0 2
UUID=65DF1F195FB62AE1 /home/username/DiskC ntfs defaults,utf8,uid=1000,gid=1000,dmask=022,fmask=133 0 0
在/home/username/目录下新建挂载目录
mkdir -p DiskA DiskB DiskC
执行
sudo mount -a
这篇关于Ubunut16.04开机挂载ext4和ntfs格式的磁盘的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!