top of page

Understand the fdisk output in detail.


Understand the fdisk output in detail

fdisk command is used to list information about all available disks and their partitions on the system. Let's understand the fdisk output in detail. use the example below as our reference in this blog.

[root@siddhesh ~]# fdisk -l
Disk /dev/sda: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: WDC WD5000AACS-0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 8BD886BB-C595-4F55-B772-5776E94B76F4
Device         Start       End   Sectors  Size Type
/dev/sda1       2048   1050623   1048576  512M EFI System
/dev/sda2    1050624   2099199   1048576  512M Linux filesystem
/dev/sda3    2099200 421529599 419430400  200G Linux filesystem
/dev/sda4  421529600 455084031  33554432   16G Linux swap
[root@siddhesh ~]#

1.Disk Information.

Disk /dev/sda: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: WDC WD5000AACS-0
  • /dev/sda: This indicates the device name of the disk. On Linux, storage devices are represented as files in the /dev directory, and sda is a common naming convention for the first SCSI/SATA/USB disk.

  • 465.76 GiB: The total size of the disk, measured in gibibytes (1 GiB = 2^30 bytes).

  • 500107862016 bytes: The total size of the disk in bytes.

  • 976773168 sectors: The total number of sectors on the disk.

  • Disk model: WDC WD5000AACS-0: This line provides information about the model of the disk. In this case, it's a Western Digital Caviar Green 500GB hard drive.


2.Units and Sector Information.

Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
  • Units: Describes the size of a sector in bytes. In this case, each sector is 512 bytes.

  • Sector size (logical/physical): Indicates the logical and physical sector size. On most modern drives, these values are the same.

  • I/O size (minimum/optimal): Specifies the minimum and optimal input/output size for the disk. In this case, both are 512 bytes.


3.Disklabel Type and Identifier.

Disklabel type: gpt
Disk identifier: 8BD886BB-C595-4F55-B772-5776E94B76F4
  • Disklabel type: gpt: This line specifies that the disk is partitioned using the GUID Partition Table (GPT) format. GPT is a modern partitioning scheme that has replaced the older Master Boot Record (MBR) in many systems.

  • Disk identifier: This is a unique identifier for the disk. It's a UUID (Universally Unique Identifier) that can be used to uniquely identify this disk.


4. Partition Information.

Device         Start       End   Sectors  Size Type
/dev/sda1       2048   1050623   1048576  512M EFI System
/dev/sda2    1050624   2099199   1048576  512M Linux filesystem
/dev/sda3    2099200 421529599 419430400  200G Linux filesystem
/dev/sda4  421529600 455084031  33554432   16G Linux swap

Each line represents a partition on the /dev/sda disk.


  • Device: Specifies the partition device name.

  • Start, End, Sectors, Size: Define the starting sector, ending sector, total sectors, and size of each partition, respectively.

  • Type: Indicates the file system type or purpose of each partition.

2 comentarios

Obtuvo 0 de 5 estrellas.
Aún no hay calificaciones

Agrega una calificación
Invitado
13 feb
Obtuvo 5 de 5 estrellas.

very well

Me gusta

Invitado
17 ene

Very well explained

Me gusta
bottom of page