Forrest logo
back to the fdisk tool

fdisk:tldr:7da4b

fdisk: List partitions.
$ sudo fdisk -l
try on your machine

The command "sudo fdisk -l" is used to list the disk partitions on your system. Here is a breakdown of the command:

  • "sudo" stands for "superuser do" and it is used to execute the following command with administrative privileges. When you run a command with "sudo" prefix, you may need to enter your password to authenticate yourself as a superuser.

  • "fdisk" is a command-line utility used for disk partitioning. It allows you to create, delete, and manage partitions on your hard drive.

  • "-l" is an option to the "fdisk" command which stands for "list". It instructs the command to list all disk partitions on your system.

When you run "sudo fdisk -l" in your terminal, it will display a table containing information about each disk partition, such as the partition type, size, start and end sectors, and the file system used. This information can be useful for understanding the disk layout of your system and managing your storage resources.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.

Questions that are answered by this command:

  • show unallocated space on a drive?
back to the fdisk tool