Fsdisk Cheat Sheet: Quick Tips and Tricks
Fdisk Cheat Sheet: Quick Tips and Tricks
If you’re a Linux user, chances are you’ve encountered fdisk at some point. This command-line utility is used for disk partitioning, and knowing how to use it effectively can save you time and frustration. Here are some quick tips and tricks to help you make the most of fdisk.
1. List Partitions
Use the command fdisk -l to list all partitions on your system. This will show you the size, type, and filesystem of each partition.
2. Create a New Partition
To create a new partition, use the command n followed by the partition type (primary or extended) and the size of the partition in sectors.
3. Delete a Partition
To delete a partition, use the command d followed by the partition number. Be careful with this command, as it will permanently delete all data on the partition.
4. Save Changes
After making changes to your partitions, use the command w to write the changes to disk. Make sure you’re certain about your changes before saving them.
5. Check Partition Table
You can check the partition table for errors using the command p. This will show you the current partition table and any errors that may be present.
By following these tips and tricks, you can become more proficient with fdisk and manage your disk partitions with ease. Remember to always double-check your commands before executing them to avoid any accidental data loss.