Sometimes you just want to have a removable USB drive that you can move easily between linux, MAC and/or Windows PCs. The easiest way is to use the Windows filesystems as there is compatibility (sometimes with a bit of config such as this) across the board.
First install DOS file system tools…
apt-get install dosfstools ntfs-3g
Find your device details before partitioning and formatting as you really don’t want to do that on the wrong drive. Run fdisk -l to list all devices connected to the system and find the right one – usually quite easy as the device sizes are listed too and you can always run before and after connecting the device to ID it easily.
Note that if your device is larger than 2TB follow my guide here to do the partition and formatting part of this guide.
Run fdisk /dev/sda (replace sda with your device).
Delete any existing partitions…
Make a new partition…
n -> p -> [Enter] -> [Enter] -> [Enter]
Specify the new partition type. List the filesystem types with l . Then change the type with
t -> 86
Run this command to format the device to NTFS
mkfs.ntfs -Q /dev/sda1
The -Q makes this command run quickly but does not wipe the underlying filesystem (i.e. an expert could recover the files on the disk if they tried hard enough).
To mount an NTFS disk you first need a mount point then we can mount it with these commands
mkdir /mnt/ntfs_disk mount -t ntfs /dev/sd? /mnt/ntfs_disk
You can also edit the fstab file to make it persistent if you wish…
/dev/sda1 /mnt/ntfs_disk ntfs-3g permissions,locale=en_US.utf8 0 2
Make sure you own the mount point though…
sudo chown your_user:your_user /mnt/excess