fdisk /dev/sdbAfter, enter “n” to create new. Now select the partition. This can be an extended partition and primary partition. Select a number of partition and finish it. Now it’s time to create a file system. You can create with just one command:
/sbin/mkfs.ext4 -L /backup /dev/sdb1After this, mount a File System. First, create a data directory:
mkdir /dataNow, mount a file system to /data:
mount /dev/sdb1 /dataTo check all mountings, run this command:
mountYou have successfully Formatted a Hard Disk on Linux Operating System. Enjoy it.