How can I use fdisk to create a ntfs partition on /dev/sdx?

I would like to know how to create a ntfs partition on /dev/sdx. I could not figure out if I should use partition type 7 86 or 87.

What is the full list of commands to use?

Asked By: user

||

You can use fdisk to create the partition “disk” division but for the partition’s file system you can use the mkfs.ntfs to create the file system in the partition that will use …

Answered By: Joke Sr. OK
  1. create a partition using fdisk

    fdisk /dev/sdx
    

    Commands:

    • to create the partition: n, p, [enter], [enter]
    • to give a type to the partition: t, 7 (don’t select 86 or 87, those are for volume sets)
    • if you want to make it bootable: a
    • to see the changes: p
    • to write the changes: w
  2. create a ntfs fileystem on /dev/sdx1:

    mkfs.ntfs -f /dev/sdx1
    

    (the -f argument makes the command run fast, skipping both the bad block check and the zeroing of the storage)

  3. mount it wherever you want

    mount /dev/sdx1 /mnt/myNtfsDevice
    
Answered By: Ijaz Ahmad
Categories: Answers Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.