Skip to content

Instantly share code, notes, and snippets.



Last active Feb 2, 2021
What would you like to do?
Arch Linux setup


Partitioning is something I do once a year and never remember. Arch's docs have great reference guides, but I just want to move on with my life without reading too much docs. This aims to simplify my partitioning experience.

fdisk /dev/<disk device>

g # new gpt disk label
n # add new partition
1 # partition 1
<empty line> # default start position

t # change partition type
1 # set partition type EFI System

n # another partition
<empty line> # default start pisition
+32G # 32gb 

t # partition type
2 # partition 2
19 # Linux Swap

<empty> # default partition number
<empty> # default start position
<empty> # default end position (end of disk)

File Systems

# EFI partition
mkfs.fat -F32 /dev/nvme0n1p1

# swap
mkswap /dev/nvme0n1p2

# root
mkfs.ext4 /dev/nveme0n1p3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment