Skip to content

Instantly share code, notes, and snippets.

@sangheestyle
Created January 19, 2015 19:15
Show Gist options
  • Save sangheestyle/626b0003a745f2e06a75 to your computer and use it in GitHub Desktop.
Save sangheestyle/626b0003a745f2e06a75 to your computer and use it in GitHub Desktop.
Mount ntfs formatted partition in linux

Sometimes you might want to share partitions between Windows and Linux. If so, make a ntfs partion and do the following.

find UUID for the partition

sudo blkid
...
/dev/sdb2: LABEL="windows_shared" UUID="9CA40342A4031F00" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="0e6c7d28-a9e0-4767-8041-686726b47e42"
...

You can find the ntfs partion with blkid. In my case, I named the partition as "windows_shared" when I created the partition. Labeling the partition makes you find the right partition easier. You need to remember the UUID, 9CA40342A4031F00. Of course, you can use file system name, /dev/sdb2 instead of UUID. It's matter of taster but I prefer UUID. Read this article.

use UUID to update /etc/fstab file

You don't want to mount the file system manually everytime. Update /etc/fstab, file system table.

sudo vim /etc/fstab

Append line as follows

UUID=9CA40342A4031F00 /home/sanghee/Windows_shared ntfs-3g defaults 0 0

It means you will mount the partition, 9CA40342A4031F00, into a specific directory you created, /home/sanghee/Windows_shared. For more information, read this.

Save and close the file. To mount new partition immediately, do the following.

sudo mount -a

Or reboot the system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment