This is not a replacement for the Arch Wiki Installation Guide! Consider this a refresher course.
(Optional) If you're using different keyboard layout, change it now using loadkeys
.
# Changes keyboard layout
loadkeys dvorak
# also available:
# colemak
# mac-dvorak / mac-us / mac-uk
Tip: See
ls /usr/share/kbd/keymaps/**/*.map.gz
for additional layouts.
Check if this path exists:
# See if this path exists
ls /sys/firmware/efi/efivars
If it is, you're using UEFI
mode. If not, you're using Legacy
mode. This will be important later.
You may already be online if you're using wired ethernet. Once you're online, skip this section!
ping 8.8.8.8
-
If you have an Android phone, this is the easiest way to go online. Connect your phone to your computer, then Settings → Tethering & Mobile Hotspot → USB Tethering (it's disabled unless your phone is connected). Then connect to it:
# Find interface names: ls /sys/class/net # Enable it: dhcpcd enp0s26f7u3u3 # ^^^^^^^^^^^^^ replace this with the actual interface name
See: Android tethering (wiki.archlinux.org)
-
For other ways to go online, see: Network configuration (wiki.archlinux.org)
This will update your system clock via NTP (Network Time Protocol).
# Enable ntp time updates
timedatectl set-ntp true
It's complicated. You'll probably use fdisk
or parted
. See Partition the disks (wiki.archlinux.org) for details.
Format any ext4 partitions you made:
# Format a partition as ext4
mkfs.ext4 /dev/sda1
# ^^^^ replace this
(Optional) If you made a swap partition, use mkswap to format them:
# Format a partition as swap space
mkswap /dev/sda3
swapon /dev/sda3
# ^^^^ replace these
Mount the root to /mnt
:
mount /dev/sda1 /mnt
(If using UEFI mode) mount the boot partition:
mkdir /mnt/boot
mount /dev/sda2 /mnt/boot
Edit your mirror list, and move the geographically-closest location to you up the list.
# Find your closest country, and bring it up
vi /etc/pacman.d/mirrorlist
Install packages using pacstrap
. This will take a while!
# Make some coffee while this is happening
pacstrap /mnt base
Tip: You can add
base-devel
as well for some developer tools.
Generate the list of partitions (/etc/fstab
) to be mounted at boot time. This will be based on what partitions are already mounted right now.
# Generate fstab
genfstab -U /mnt >> /mnt/etc/fstab
Use arch-chroot
to "enter" the new file system. This will make root path (/
) be what's in the new partition (until you exit
).
# ~Enter the system~
arch-chroot /mnt
# Set your timezone (eg, Asia/Manila)
ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
# Update time config (/etc/adjclock)
hwclock --systohc
# Uncomment `en_US.UTF-8 UTF-8` in this file
vi /etc/locale.gen
# Generate locale config (/etc/locale.gen)
locale-gen
(Optional) If you use a different keyboard layout, make it persist on boot.
vi /etc/vconsole.conf
Set it to:
KEYMAP=de-latin1
Update /etc/hostname
:
echo "myhostname" > /etc/hostname
# ^^^^^^^^^^ change it to whatever you feel like using
Update /etc/hosts
:
vi /etc/hosts
127.0.0.1 localhost ::1 localhost 127.0.1.1 myhostname.localdomain myhostname
passwd
# Create the user
useradd rsc
# ^^^ change this
# Create their home dir
mkdir /home/rsc
# ^^^
The admin group is named wheel
.
usermod -a -G wheel rsc
# ^^^ change this
Tip: You'll want to add them eventually to
audio,input,video
too.
Add and configure the sudo
package to grant your user some superuser rights.
# Install sudo
pacman -S sudo
# Update config
visudo
Add this:
rsc ALL=(ALL) all
It's a long story. See GRUB for details. For example, this was what I had to do with a MacBook Air 2015. It might be diffirent for your system!
# Install grub
sudo pacman -S grub
# https://wiki.archlinux.org/index.php/GRUB#Installation
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=arch_grub
grub-mkconfig -o /boot/grub/grub.cfg
# via https://wiki.archlinux.org/index.php/Mac#Setup_bootloader
bootctl --path=/boot install
Remove the USB stick and reboot. You may need to update your BIOS to boot to your new partition.