Ubuntu - how do i format a drive as ntfs?

Soldato
Joined
12 Jan 2006
Posts
2,547
Hi all,
i cant seem to find the commands i am looking for on the web
Could you please point me to the right direction on how to format a drive as ntfs-3g (searching around this is the fastest filesystem also usable by windows)

Thanks in advance
 
You will need to install and compile ntfsprogs and the kernel driver to be able to access ntfs volumes in linux

Some distros have this already, try "apt-get install ntfsprogs". If not you will need to compile it.

You can then do mkfs.ntfs /dev/sda2

Assuming /dev/sda2 was the disk you wanted to format.
 
if you just want to format it and use a different filesystem, then just change it's label and use mkfs to "format"

Code:
sudo fdisk /dev/sdb
(where sdb is changed for the actual disk label shown in `sudo fdisk -l` - remember it's the DISK not PARTITION.. so it'll not have the succeeding number)
then press "t".
Enter the number of the partition you wish to change.
Then press "l" to see a list of codes, choose a simple one.. linux (default number 83)
then press w to quit and write partition table.

Now back on command line type:
Code:
sudo mkfs.<fstype> /dev/sdb1
where <partitiontype> is the type of filesystem you want to format it to (when you've typed 'mkfs.' hit tab twice to see list of types) and sdb1 is the partition label.

press 'y' to are you sure, wait for it to finish, enjoy!

edit: Mis-read what you are wanting to do. Yes, ntfsprogs is the module you are looking for.
 
Last edited:
For future GUI based fun if you need to do this a lot.
Open a command line terminal window:
sudo apt-get install ntfsprogs gparted

Then you can use System Menu, Administration, Partition Editor

Right click the drive and select unmount if it has a little key icon next to it.
Then destroy partition tables at will!
 
Last edited:
Back
Top Bottom