Linux学习之路--Linux下自动挂载Windows下的磁盘

使用命令

写道
fdisk -l

 查看磁盘信息

 

我的如下:

写道
Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 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 identifier: 0xf0b1ebb0

Device Boot Start End Blocks Id System
/dev/sda1 * 63 40965749 20482843+ 7 HPFS/NTFS/exFAT
/dev/sda2 40965750 625137344 292085797+ f W95 Ext'd (LBA)
/dev/sda5 40965813 172634489 65834338+ b W95 FAT32
/dev/sda6 172634553 321846209 74605828+ b W95 FAT32
/dev/sda7 321846273 471057929 74605828+ 7 HPFS/NTFS/exFAT
/dev/sda8 471057993 563704784 46323396 7 HPFS/NTFS/exFAT
/dev/sda9 563707904 616751103 26521600 83 Linux
/dev/sda10 616753152 625135615 4191232 82 Linux swap / Solaris
 

使用

写道
vim /etc/fstab

 编辑文件如下:

写道
#
# /etc/fstab
# Created by anaconda on Wed Sep 14 20:37:29 2011
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=1c4d9ab3-12cd-4a15-9349-b1cb40515f2d / ext4 defaults 1 1
UUID=258a924f-aab5-4ddf-a06b-d05b24888e4c swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0

# /dev/sda5 d
/dev/sda5 /mnt/d vfat defaults 0 0

# /dev/sda6 e
/dev/sda6 /mnt/e vfat defaults 0 0

# /dev/sda7 f
/dev/sda7 /mnt/f ntfs defaults 0 0

# /dev/sda8 g
/dev/sda8 /mnt/g ntfs defaults 0 0

 重启机器即可

 

你可能感兴趣的:(windows)