To create partitions on a disk using fdisk, follow these steps:
-
Open a terminal and run
fdiskwith the appropriate disk device. Replace/dev/sdXwith your actual disk identifier (e.g.,/dev/sda):sudo fdisk /dev/sdX -
Inside the
fdiskinteractive prompt, you can use the following commands:n: Create a new partition.d: Delete a partition.t: Change a partition's system ID.w: Write the changes and exit.
-
After creating or modifying partitions, always remember to write the changes with the
wcommand to ensure they are saved.
Note: Be cautious when modifying partitions, as improper changes can lead to data loss. Always back up important data before proceeding.
