When you have a dual-boot setup and want your Windows partition automatically mounted in Linux, /etc/fstab is the way to do it persistently. The UUID approach is better than using /dev/sda1 style names because device names can change — UUIDs don’t. The uid and gid params ensure your user owns the mounted files.
- Find your partition UUID details
- Create directory to mount windows partition
1
| $ sudo mkdir /mnt/windows_drive
|
- Check your user uid and gid
1
2
3
| $ cat /etc/passwd
# most commonly the uid and gid are 1000, else update as per your user id
|
- Edit /etc/fstab and add below entry
1
| $ sudo "UUID=ID_FROM_LSBLK /mnt/windows_drive ntfs rw,auto,user,fmask=133,dmask=022,uid=1000,gid=1000 0 0" >> /etc/fstab
|