linux自动挂载windows磁盘

自动挂载配置文件: /etc/fstab

 1 # /etc/fstab: static file system information.
 2 #
 3 # Use 'blkid' to print the universally unique identifier for a
 4 # device; this may be used with UUID= as a more robust way to name devices
 5 # that works even if disks are added and removed. See fstab(5).
 6 #
 7 # <file system> <mount point>   <type>  <options>       <dump>  <pass>
 8 # / was on /dev/sda6 during installation
 9 UUID=57206175-00ff-41ec-9cf5-572ecc7980ba /               ext4    errors=remount-ro 0       1
10 # swap was on /dev/sda5 during installation
11 UUID=1a52a3c2-3904-47d9-be13-06603b84eb11 none            swap    sw              0       0
12 #/sbin/mount.ntfs /dev/sdb1 /media/ubuntu/50g -o rw,nodev,nosuid,uid=1001,gid=1001,uhelper=udisks2
13 #/sbin/mount.ntfs /dev/sda1 /media/ubuntu/Windows10 -o rw,nodev,nosuid,uid=1001,gid=1001,uhelper=udisks2
14 #/sbin/mount.ntfs /dev/sda2 /media/ubuntu/?态软件 -o rw,nodev,nosuid,uid=1001,gid=1001,uhelper=udisks2
15 #/sbin/mount.ntfs /dev/sdb2 /media/ubuntu/软件 -o rw,nodev,nosuid,uid=1001,gid=1001,uhelper=udisks2
16 #/sbin/mount.ntfs /dev/sdb3 /media/ubuntu/学习 -o rw,nodev,nosuid,uid=1001,gid=1001,uhelper=udisks2
17 #/sbin/mount.ntfs /dev/sdb4 /media/ubuntu/90g -o rw,nodev,nosuid,uid=1001,gid=1001,uhelper=udisks2
18 /dev/sdb1 /media/ubuntu/50g            ntfs defaults,locale=zh_CN.UTF-8 0 0 
19 /dev/sda1 /media/ubuntu/Windows10    ntfs defaults,locale=zh_CN.UTF-8 0 0 
20 /dev/sda2 /media/ubuntu/固态软件    ntfs defaults,locale=zh_CN.UTF-8 0 0 
21 /dev/sdb2 /media/ubuntu/软件        ntfs defaults,locale=zh_CN.UTF-8 0 0 
22 /dev/sdb3 /media/ubuntu/学习        ntfs defaults,locale=zh_CN.UTF-8 0 0 
23 /dev/sdb4 /media/ubuntu/90g            ntfs defaults,locale=zh_CN.UTF-8 0 0 

先手动将所有磁盘打开,再用ps -ef | grep mount.ntfs查出所有磁盘的mount状态,粘贴到/etc/fstab改一下,重启就看到效果了

 

参考自 ubuntu14.04开机自动挂载windows磁盘的配置方法

posted @ 2017-05-11 10:25  cdongyang  阅读(1766)  评论(0编辑  收藏  举报