Linux Commands Reference - Complete Linux Command Guide

Comprehensive Linux command reference with 150+ commands. Search, filter by category, and view detailed usage examples.

Share
Back to commands

fdisk

Disk partition tool

Syntax

fdisk [OPTION]... DEVICE

Common Options

-lList partition table
-nCreate new partition
-dDelete partition
-tChange partition type
-pPrint partition table
-wWrite partition table
-sShow partition size

Common Examples

fdisk -l

List all disk partitions

fdisk /dev/sda

Partition /dev/sda

fdisk -l /dev/sda

View sda partition table

sudo fdisk -l | grep "Disk /dev"

Show only disk info

Related Commands

Related Tools

More Code & Dev Tools