What is fdisk?

In simple words, fdisk refers to the external command-line utility of MS-DOS that configures the hard drives of the computers. Technically, it is the manipulator of the partition table on Linux and also writes the Master Boot Record (MBR).

Understanding fdisk

What is fdisk

Ideally, the command-line utility fdisk facilitates disk partitioning and has been an integral part of the Disk Operating System (DOS).

Initially, fdisk was available in different operating systems such as:

The DOS fdisk utility was however available with the original Windows 95 operating system and could only create File Allocation Table or FAT partitions, especially the FAT12 and FAT16 types of it. The later type, FAT32, came with the Windows 95B versions and higher.

However, in Windows 2000 and its successor, Windows XP, there is a more advanced graphical Windows Disk Management utility and Recovery Console called DiskPart, a logical Disk Manager.

In addition to that, it was also a part of a few specific ports of the following open-source and free Unix-like operating systems:

This inclusion offered additional compatibility.

The most significant advantage of using the fdisk utility is that it allows hiding the partitions from other users. This ensures that your data is protected.

Moreover, you can use it as a boot manager as well. This will allow you to use more than one operating system most easily.

And, most importantly, if you are using an old computer system, there will be no need to upgrade the Basic Input Output System (BIOS).

However, there are a few limitations to fdisk. One of the most notable drawbacks of it is that it does not allow moving an application from one partition to the other, or from one drive letter to the other, without uninstalling and reinstalling.

Another notable downside of it in this respect is that you will not be able to delete a partition without losing all the data stored in it.

This means that you will have to repeat the whole fdisk process from the beginning and reformat the partition.

Read Also:  How to Password Protect an External Hard Drive?

Ideally, it is also required to create a number of partitions if you want to make the best use of the full capacity of the hard drive.

What is fdisk


The added capabilities of DOS fdisk make it a competent partitioning tool just like the other third-party programs.

It will help you to set up the partition in an ideal manner and it will let more than one operating system to exist on one single system.

However, fdisk shows two DOS partitions only, such as:

The extended partition is, however, further divided into different logical volumes, each of which acts as an individual partition.

The minimum size of a partition is 1 MB, following the principle of creating partitions by the fdisk in DOS 4.0 or later on numbers of megabytes. The sizes of these partitions are typically restricted to 2 GB.

In comparison, the DOS versions before 4.0 supported a maximum partition size of 32 MB.

However, with the use of the FAT32 file system in different operating systems, such as Windows 95, DOS 7, and others, the maximum size of the partitions was increased up to 2 TB.

This is a huge number of bytes. It can be calculated as:

2 TB

= 2048 GB

= 2,097,152 MB

= 2,147,483,648 KB

= 2,199,023,255,552 bytes.

What is fdisk Used for?

Typically, fdisk is used for preparing and partitioning a new hard disk drive, creating additional hard drives, and even setting the computer to use multiple operating systems or multi-booting.

The tool allows changing the partitioning of the hard drive on different types of operating systems apart from the common ones already mentioned above, such as:

In summary, when you use the fdisk utility, you can do a lot of things, such as:

fdisk in Linux

In all Linux distributions, you will find fdisk already pre-installed as it is the standard package of the Linux kernel. This tool allows resizing, viewing, deleting, copying, changing, and moving partitions on the hard drive by using different commands.

You can create as many as four new primary partitions along with many logical partitions, depending on the size of the hard disk in the system.

Typically, using the fdisk command in Linux will help you to manipulate the hard disk in a lot of different ways such as:

All these can be done by using a few specific commands on Linux.

To use fdisk on Linux, the syntax is very simple, which is fdisk .

You will be provided with a lot of different options that are necessary to use with the fdisk command in Linux. Take a look at these options:

Read Also:  What is Variable Bit Rate (VBR)? (Explained)

A few common commands to use fdisk in Linux are as follows:

If you are stuck anywhere at any point during the process, you should use the manual of the tool. In such times, instead of using the traditional fdisk command, sudo fdisk–help, you should run ‘man fdisk.’

fdisk Command in DOS

The fdisk command in DOS will allow you to create new partitions or delete an existing partition on a hard drive.

The commonly used command line parameter is FDISK [/STATUS] /X, where the status displays the information of the partition and ‘x’ will ignore Logical Block Addressing (LBA) or extended disk support.

In addition to that, there are also a few other undocumented or secret fdisk switches to use such as:

Read Also:  What is PCIe SSD? Uses, Benefits & Challenges

You can use an additional command and follow these steps for using an fdisk script file from an external file. This will also allow creating and deleting partitions faster.

To do this, first you will have to create a file with the help of the DOS edit command and then do the following:

Edit fdisk.scr – This is the edit screen. You will need to enter the commands to run in fdisk here, and display the information of the partition.

Here are the additional steps to follow:

This will act as a carriage return. Just make sure that all the input commands are on one line to run fdisk.

When the script file is created, type fdisk < fdisk.scr to execute the file.

fdisk Vs gdisk


So, coming to the end of the article, you now must have a fair idea about fdisk, how it works and how to use it to your advantage.

It is a very useful utility to configure the hard drive in your computer.

However, before you go ahead with the process, make sure that you take a backup of everything in your system first.