Skip to content

Instantly share code, notes, and snippets.

@royki
Last active November 29, 2020 19:31
Show Gist options
  • Save royki/78e5e65c60546005916264eb2dea3f1f to your computer and use it in GitHub Desktop.
Save royki/78e5e65c60546005916264eb2dea3f1f to your computer and use it in GitHub Desktop.
Increase partition size in Ubuntu

➜ ~ sudo fdisk /dev/sda

Welcome to fdisk (util-linux 2.34).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/sda: 24.42 GiB, 26214400000 bytes, 51200000 sectors
Disk model: VBOX HARDDISK   
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: dos
Disk identifier: 0x402d3e0e

Device     Boot    Start      End  Sectors Size Id Type
/dev/sda1  *        2048 33554431 33552384  16G 83 Linux
/dev/sda2       33556478 41940991  8384514   4G  5 Extended
/dev/sda5       33556480 41940991  8384512   4G 82 Linux swap / Solaris


Command (m for help): p
Disk /dev/sda: 24.42 GiB, 26214400000 bytes, 51200000 sectors
Disk model: VBOX HARDDISK   
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: dos
Disk identifier: 0x402d3e0e

Device     Boot    Start      End  Sectors  Size Id Type
/dev/sda1           2048 51199999 51197952 24.4G 83 Linux
/dev/sda2       33556478 41940991  8384514    4G  5 Extended
/dev/sda5       33556480 41940991  8384512    4G 82 Linux swap / Solaris
  • resize2fs /dev/sda1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment