It is used to create and organize space for new partitions or new drives, rearrange old drives, and move and copy information to new disks. In your system, you can create as many partitions as you want, and you can extend the partitions using fdisk commands. Remember, you must be the root user to run the fdisk command. This guide will show you the use of fdisk -l commands in Linux.
How To Use fdisk -l Command in Linux
First, let’s execute the basic command used to list all existing disk partitions on the system:
The –l argument specifies listing all the partitions used with the fdisk command, and their devices’ names display the partitions.
View a Specific Disk Partition
You can execute the following command to view all partitions of a specific hard disk:
The previous command included the –l argument followed by the specific device name like “/dev/sda”.
fdisk Command Help
You can use the following commands to get the information about the option available in fdisk:
If you want to know more about the fdisk command and how you create partitions, we recommend you visit this page. We have uploaded a brief guide to help you make the partition using the fdisk command in Linux.
Conclusion
In this guide, we have explained the different uses of the fdisk partition commands in Linux. It may seem a little complicated to understand the commands initially, but you will become excellent at using them once you get hands-on practice. We hope this guide is simple to understand the fdisk commands in Linux. Feel free to ask if you have any queries in the comment section.