How To Use Parted In Linux?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
1. Start by opening a terminal window.
2. Enter the command ‘sudo parted’. This will open the parted prompt.
3. To view a list of available disks, type ‘print’.
4. To select a disk to partition, type ‘select device’ followed by the device name.
5. To create a new partition, type ‘mkpart’ followed by the desired partition type and the size of the partition.
6. To delete a partition, type ‘rm’ followed by the partition number.
7. To write the changes to disk, type ‘quit’.
8. To exit the program, type ‘exit’.
1. Launch the Parted utility by entering the following command in the terminal:
sudo parted
2. Select the disk you want to partition by entering the following command:
select /dev/sdx
Replace “sdx” with the name of your disk.
3. To view the current partition table and available disk space, enter the command:
print
4. To create a new partition on the disk, enter the command:
mkpart primary size1 size2
where size1 is the starting position and size2 is the end position of the partition in MB or GB.
5. To delete an existing partition, enter the command:
rm partition_number
where partition_number is the number of the partition to be deleted.
6. To save and apply the changes, enter the command:
quit
7. Enter the command:
sudo partprobe
to update the kernel with the new partition table.