Formatting and partitioning disks are crucial parts of Linux administration. Do you own a Linux system? If you are worried about space issues or fixing system errors, you can quickly resolve them by formatting the partition. The question is how to format partition in Linux. Don't worry! you are at the right place!
In Linux, there is no such dedicated disk management tool that can help us to format partitions. So, we need to use the mkfs commands' help to format a Linux partition. But before formatting the Partition in Linux, you need some of the prerequisites:
- A system running Linux
- An account with sudo or root privileges
- Access to a terminal window or command line (Activities > Search > Terminal)
Before formatting the partition in your Linux PC, you need to locate a partition you want to format. You can do it with the help of the lsblk command, which displays bock devices. Normally block devices are those files that represent devices such as USB drives, hard drives, RAM, and CD/ROM drives.
The terminal prints out a complete list of all the block devices along with information about them like:
- NAME - The device names
- TYPE - The type of the device
- SIZE - The size of the device
- MOUNTPOINT - Device's mount point
- RO - Whether the device is read-only or not
- MAJ: MIN - Minor or major device numbers
- RM - Whether the device is removable or not (1 if yes, 0 if no)
Here we will use the /dev/sdb1 partition as an example.
The lsblk command without additional options will not display the information about the device's file systems.
If you want to display a list containing information about the file system, add the -f option, which will be like lsblk -f.
Read the post further to learn how to format Linux partitions in these three different formats. There is a link to help you if you want to format a USB in Linux:
There are three basic ways to format the disk partitions using the mkfs command:
- Format Partition in Linux with FAT32 File System
- Format Partition in Linux with Ext4 File System
- Format Partition in Linux with NTFS File System
The typical syntax for formatting disk partitions in Linux is as follows:
mkfs[options] [-t type fs-options] device [size]
Let's check out how to format drives into these file systems.
You can easily format partitions in Linux with the FAT32 file system. First, follow the below guide properly.
Step 1. You need to use the command sudo mkfs -t vfat/dev/sdb1 to format the Partition in Linux with FAT32 File System.
Step 2. Again, run the lsblk command. Verify the file system format change and locate the desired partition from the list using the command lsblk-f.
If you want to format partitions in Linux with the ext4 File system, follow the guide below.
Step 1. You need to use the command sudo mkfs -t ext4/dev/sdb1 to format a disk partition with the ext4 file system.
Step 2. Next, you must verify the file system change using the command: lsblk -f. This command will help the terminal print out a block device list.
Step 3. Now locate the ideal partition and confirm that this partition uses the ext4 file system.
By the way, if you want to use any third-party trusted tool, then EaseUS Partition Master Free can help you format partitions to EXT2/3/4, which are compatible with Linux.
You can also format partitions in Linux with NTFS File System. To do so, follow the below guide properly.
Step 1. Run the mkfs command, sudo mkfs -t ntfs/dev/sdb1, and specify the NTFS file system to format a disk. This command will help the terminal to print a confirmation message when the formatting process finishes.
Step 2. Next, you must use the command lsblk-f to verify the file system.
Step 3. Now locate the selected Partition and validate that it uses the NFTS file system.
Well, besides using commands to format a partition in Linux, you can also format a partition for Linux tests in Windows. Here, you may like to know a professional format tool, EaseUS Partition Master.
As we mentioned above, EaseUS Partition Master is one of the leading and advanced partition managers who can help you to format partitions in Linux-supported systems. It can format partitions to EXT 2/3/4 easily and you can finish this process with simple clicks.
Now, let's see how to use EaseUS Partition Master to format a partition to the format you want.
Step 1. Launch EaseUS Partition Master, right-click the partition you intend to format and choose "Format".
Step 2. In the new window, enter the Partition label, choose the FAT32/EXT2/EXT3/EXT4 file system, and set the cluster size according to your needs, then click "OK".
Step 3. Then you will see a warning window, click "Yes" in it to continue.
Step 4. Click the "Execute 1 Task(s)" button in the top-left corner to review the changes, then click "Apply" to start formatting the partition to FAT32/EXT2/EXT3/EXT4.
This tool comes with both free as well aspro versions. Let's discuss more the features of this reliable tool.
- Create/Delete Partition: This tool can save all data on a disk after creating or deleting partitions you don't need anymore.
- Merge Partitions: The EaseUS Partition Master tool can merge partitions to combine two partitions as one. In addition, this tool knows how to resolve the C drive entirely and manage a few partitions from disarray.
- Resize/Move Partition: Without any data loss, this tool can adjust the used partition and extend it.
- Extend system partition: Extending the system partition or C drive, this tool can easily make full use of the free or unallocated space.
- Format hard drive/Wipe Partition: It can efficiently format disks or wipe partitions in different file systems.
- Quick partition New disk: This tool can easily set up a brand-new disk without any partitions.
- Convert MBR to GPT: You can easily convert MBR to GPT with its help.
- Convert FAT32 to NTFS: It also allows you to change the file system format of your device and convert FAT32 to NTFS.
When it comes to EaseUS Partition Master, it is a reliable tool that comes with a user-friendly interface, a preview feature along with many other attractive features. We will recommend you use this tool for partition format. Always download the tool from the official website.
If you are still following the post, you must know the format partition in Linux. We recommend using EaseUS Partition Master to format partitions to EXT2/3/4, which are compatible with Linux. If you have other questions or problems about format partition in Linux, just continue reading.
FAQs About Format Partition in Linux
In this paragraph, there are three questions and answers you may be concerned about. Continue to read and learn.
1. Can you format a drive with Linux on it?
Sure, you can do it, but you need to either have a bootable disk that gives you access to disk partitions, or you can connect the Linux disk to another PC or Mac and then format the drive.
2. What are the types of partitions in Linux?
There are two primary partitions on a Linux system: data partition and swap partition. The data partition contains standard Linux system data, and the root partition usually includes all data to start up and run the system. The swap partition has the computer's physical memory and extra memory on the hard disk.
3. What is a formatting command?
The command usually forms a new root directory and file system for your disk. This command can also check for bad areas on your disk and delete all data on the disk.
Was This Page Helpful?
Editor's Pick Review
EaseUS Data Recovery Services
EaseUS data recovery experts have uneaqualed expertise to repair disks/systems and salvage data from all devices like RAID, HDD, SSD, USB, etc.