Created
March 9, 2026 17:07
-
-
Save Alex7k/4c80720b647d17ede1e96c470383d6ff to your computer and use it in GitHub Desktop.
Expand linux partition
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| lsblk # show info about partitions | |
| # (EXAMPLE OUTPUT) | |
| # NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS | |
| # sda 8:0 0 2T 0 disk | |
| # ├─sda1 8:1 0 2.9G 0 part / | |
| # ├─sda14 8:14 0 3M 0 part | |
| # └─sda15 8:15 0 124M 0 part /boot/efi | |
| # expand partition (make sure to specify the right partition by looking at the tree you got above! | |
| sudo growpart /dev/sda 1 | |
| # you may need to do the following to expand the filesystem | |
| sudo resize2fs /dev/sda1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment