Skip to content

Instantly share code, notes, and snippets.

@ArthurDelannoyazerty
Last active July 10, 2025 22:39
Show Gist options
  • Save ArthurDelannoyazerty/5dc269b058276caf07c1ab1b631aba05 to your computer and use it in GitHub Desktop.
Save ArthurDelannoyazerty/5dc269b058276caf07c1ab1b631aba05 to your computer and use it in GitHub Desktop.

First utils

localectl list-keymaps
loadkeys fr
# setfont ter-132b
kdbrate -d 500 -r 10

INTERNET

ip link
iwctl
device list
station NAMEDEVICE scan
station NAMEDEVICE get-networks
station NAMEDEVICE connect STATION

PARTITION

Create partition table

# Save partition table
sfdisk -d /dev/sda > sda.dump

# Manage partitions https://wiki.archlinux.org/title/Installation_guide#Example_layouts
fdisk /dev/sda
# Or with better UI
cfdisk /dev/sda

# Order the partitions
sfdisk -r /dev/sda

Format partitions

# Optional, check partition type
file -s /dev/sdaN
# Format partitions to the good format (+wipe data)
# For ext4
mkfs.ext4 /dev/sdaN
# For SWAP
mkswap /dev/sdaN
# For EFI (Only if created during partition !)
mkfs.fat -F 32 /dev/sdaN

Mount points

# Check mount point, partitions ...
lsblk -o NAME,FSTYPE,LABEL,SIZE,MOUNTPOINT
# Mount the partition in /mnt (because we are not in the real arch for now)
mount /dev/sda5 /mnt
mkdir -p /mnt/boot/efi
mount /dev/sda4 /mnt/boot/efi
# Activate SWAP partition
swapon /dev/sda6

Setup system

# Create pacman instance + Install base package
pacstrap -K /mnt base linux linux-firmware

# save paritions setup into new system
genfstab -U /mnt >> /mnt/etc/fstab

# Go into / Interact with the new system
arch-chroot /mnt

# set hardware clock
hwclock --systohc

# Generate the /etc/locale.gen (locale options) and create/edit the /etc/locale.conf
locale-gen
echo LANG=en_US.UTF-8 > /etc/locale.conf

# Hard set a keyboard layout
echo KEYMAP=fr > /etc/vconsole.conf

# Set pc network name
echo arch-portable > /etc/hostname

# Set root password
passwd

# Add user and its password
useradd -m -G wheel,audio,video,input,power,network,rfkill,users,lp,scanner -s /bin/bash USERNAME
passwd USERNAME

# Setup pacman
pacman-key --init
pacman-key --populate archlinux
pacman -Syu

Install Boot loader

# For GRUB
pacman -Syu grub efibootmgr
grub-install --target=x86_64-efi --efi-directory=<EFI_MOUNT_POINT_DIRECTORY> --bootloader-id=GRUB   # /boot/efi
grub-mkconfig -o /boot/grub/grub.cfg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment