How to format the new partition?

To format a new partition, you can use the mkfs command. Here’s how to do it:

  1. First, identify the new partition you created. It will typically be named something like /dev/sdX1, where X is the letter of your disk and 1 is the partition number.

  2. Open a terminal and run the following command to format the partition. Replace /dev/sdX1 with your actual partition name and choose the desired filesystem type (e.g., ext4, ntfs, vfat):

    sudo mkfs.ext4 /dev/sdX1

    For example, to format as NTFS:

    sudo mkfs.ntfs /dev/sdX1
  3. After formatting, you can mount the partition to a directory. Create a mount point if it doesn't exist:

    sudo mkdir /mnt/my_partition
  4. Then mount the partition:

    sudo mount /dev/sdX1 /mnt/my_partition
  5. To make the mount persistent across reboots, you can add an entry to /etc/fstab.

Always ensure you have backed up important data before formatting, as this process will erase all data on the partition.

0 Comments

no data
Be the first to share your comment!