How to format a disk using mkfs command?

How to format a disk using mkfs command?

1 Run the mkfs command and specify the NTFS file system to format a disk: sudo mkfs -t ntfs /dev/sdb1 The terminal prints a confirmation message when the formatting process 2 Next, verify the file system change using: lsblk -f 3 Locate the preferred partition and confirm that it uses the NFTS file system.

Do you have to be root to use mkfs?

Since the mkfs command deals with disks and partitions, it requires you to be either root or sudo user with access to run admin commands. mkfs is a powerful tool. It is important to understand the potential consequences of altering the filesystem. Selecting the wrong device node will erase all data on that device. Use this command at your own risk.

Can a Sudo user use the mkfs command?

I’ll also provide examples for using the mkfs command effectively. Since the mkfs command deals with disks and partitions, it requires you to be either root or sudo user with access to run admin commands. mkfs is a powerful tool. It is important to understand the potential consequences of altering the filesystem.

How do you format a disk in Linux?

Run the mkfs command and specify the NTFS file system to format a disk: The terminal prints a confirmation message when the formatting process completes. 2. Next, verify the file system change using: 3. Locate the preferred partition and confirm that it uses the NFTS file system.

How to format a disk partition with NTFS?

Formatting Disk Partition with NTFS File System. 1 1. Run the mkfs command and specify the NTFS file system to format a disk: The terminal prints a confirmation message when the formatting process 2 2. Next, verify the file system change using: 3 3. Locate the preferred partition and confirm that it uses the NFTS file system.

How to mount a hard disk in Debian?

The disk will be mounted using the following commands: So that the hard disk will automatically be re-mounted after the next re-start, the following line must be added to the /etc/fstab file: