How to create a partition?

To create a partition using fdisk, follow these steps:

  1. Open a terminal and start fdisk with the appropriate disk device. Replace /dev/sdX with your actual disk (e.g., /dev/sda):

    sudo fdisk /dev/sdX
  2. Inside the fdisk prompt, use the following commands:

    • Type n to create a new partition.
    • Follow the prompts to specify the partition type (primary or extended), partition number, and size.
    • After setting up the partition, type w to write the changes and exit.
  3. If you need to delete a partition, you can use the d command.

  4. Always ensure you have backed up important data before modifying partitions, as changes can lead to data loss.

Remember, these commands will not work in a virtual environment where actual disk partitions cannot be modified.

0 Comments

no data
Be the first to share your comment!