Published on

Install Arch Linux; Step by Step Guide

Authors

Install Arch Linux (Step-by-Step Guide)

Connect to the Internet

iwctl --passphrase "3Lox-Ube4-n6Qw-nCF1" station wlan0 connect "CASA-WIFI-5GHz"

Storage

sdX is a generic reference. Use your device name here. (eg.nvme0n1, etc.)

Display Storage Devices

$ lsblk

-- and/or --

$ fdisk -l

Shred Storage Device

$ shred -v -n1 /dev/sdX

Partitioning Tools

*** Less Interactive ***
$ gdisk /dev/sdX

*** More Interactive ***
$ cfdisk /dev/sdX

Partitions

EFI System Partition

/dev/sda1

512 MB
Partition Type - FAT32
Space for boot loaders and other files required for booting.

Swap Partition

/dev/sda2

4GB
Partition Type - Linux Swap
Swap space is used to extend the virtual memory beyond
the installed physical memory (RAM) or for suspend-to-disk support.

Linux Partition

/dev/sda3

Remaining size of disk
Partition Type - Linux Filesystem
This is the root (/) partition where Arch Linux operating system,
files, and other information will live.

Format Partitions

sda1… is a generic reference. Use your device name here. (eg.nvme0n1p1, etc.)

EFI Partition

mkfs.fat - F32 / dev / sda1

Swap Partition

mkswap / dev / sda2
swapon / dev / sda2

Root Partition

mkfs.ext4 / dev / sda3

Install Distro

Update Pacman

# Update Package List
pacman -Syy

# Install Keyring
pacman -Sy --needed archlinux-keyring

Mount Root Partition

mount / dev / sda3 / mnt

Pacstrap

pacstrap /mnt base base-devel linux linux-firmware vim

Handy Utilities

pacstrap /mnt iw iwd wpa_supplicant wireless_tools networkmanager dhcpcd

Generate fstab

mkdir /mnt/etc
genfstab -U /mnt >> /mnt/etc/fstab
cat /mnt/etc/fstab

Switch to Installed Root Partition

arch - chroot / mnt

Locale Setup

Timezone

mkdir / etc / localtime
ln - sf / usr / share / zoneinfo / US / Central / etc / localtime

Setup Clock

hwclock --systohc

Setup Locale

vim /etc/locale.gen

en_US ISO-8859-1
en_US.UTF-8 UTF-8

Generate Locale Config File

locale - gen

Set LANG Variable

echo LANG=en_US.UTF-8 > /etc/locale.conf
export LANG=en_US.UTF-8

Set Hostname

echo archy > /etc/hostname

vim /etc/hosts
127.0.0.1      localhost
::1            localhost
127.0.1.1      archy

Set Root Password

passwd

Add User

useradd -m -g users -s /bin/bash {username}
passwd {username}

visudo
## User privilege specification
root ALL=(ALL:ALL) ALL
{username} ALL=(ALL:ALL) ALL

exit
login
{username}
pacman -Syy

Bootloader

# Install Grub Bootloader and EFI Boot Manager Packages
pacman -S grub efibootmgr os-prober mtools

# Create mount point for /dev/sda1 and mount
mkdir /boot/efi
mount /dev/sda1 /boot/efi

# Install Bootloader
grub-install --target=x86_64-efi --bootloader-id=grub_uefi

# Generate grub.cfg
grub-mkconfig -o /boot/grub/grub.cfg

Reboot

# Exit chroot

exit

# Unmount everything

umount -R /mnt

# Reboot

shutdown now -r

Configure Network

Check Driver Status

;(lspci - k) | more

Get the name of the interface

iw dev

Generate WPA Supplicant Config File

wpa_passphrase MYSSID passphrase > /etc/wpa_supplicant/wpa_supplicant.conf

***

update_config=1
network={
	ssid="CASA-WIFI-5GHz"
	psk="3Lox-Ube4-n6Qw-nCF1"
	mesh_fwding=1
}

Start Services

systemctl start dhcpcd.service
systemctl start NetworkManager.service

Display WiFi Networks

nmcli device wifi list

Connect to WiFi

nmcli device wifi connect CASA-WIFI-5GHz password 3Lox-Ube4-n6Qw-nCF1

Generate a “Quick Connect” Startup Script

./wifi-connect.sh

systemctl start dhcpcd.service
systemctl start NetworkManager.service
nmcli device wifi connect CASA-WIFI-5GHz password 3Lox-Ube4-n6Qw-nCF1

"3Lox-Ube4-n6Qw-nCF1" station wlan0 connect "CASA-WIFI-5GHz"