I made this guide to easily install Arch Linux without having to go to many different links just to get it working. Then I decided to share it here for others who may be new to linux and may not completely understand the Arch Wiki.
This is a guide about how to install Arch Linux from start to finish in one place. If you follow these steps you will end up with an clean install of Arch Linux without any graphical environment.
Keep in mind that this guide is made for BIOS and not UEFI systems
-
Check if you have a UEFI system:
$ ls /sys/firmware/efi/efivars- If the command shows you the directory without any error, then you have a UEFI system. But you may still be able to follow this guide to some extent.
-
If you got an error that looks like this, then you are good to go and can follow this guide.
ls: cannot access '/sys/firmware/efi/efivars': No such file or directory
Pre install steps
1. Set the keyboard layout
-
Find keyboard layout:
$ ls /usr/share/kbd/keymaps/**/*.map.gz -
Set the keyboard layout example:
$ loadkeys sv-latin1
2. Connect to the internet
-
Enable the network interface:
$ ip link -
Verify that it works:
$ ping pigges.xyz
3. Update the system clock
-
Enable the clock service:
$ timedatectl set-ntp true -
Check the service status:
$ timedatectl status
4. Partition the disks
-
Check what disks are connected:
$ lsblkExample for lsblk:
-
Enter fdisk:
$ fdisk /dev/sda-
Example partition layout for a 100GB disk:
NAME SIZE TYPE MOUNT sda 100Gdisk ├─sda1 200Mpart /boot├─sda2 12Gpart [SWAP]├─sda3 30Gpart /└─sda4 57.8Gpart /home
-
5. Format the partitions
-
Make filesystem for all the partitions except for the
SWAPpartition:
$ mkfs.ext4 /dev/sdaX -
Make and enable
SWAP:
$ mkswap /dev/sda2 $ swapon /dev/sda2
6. Mount file systems
-
Mount the root partition to
/mnt:
$ mount /dev/sda1 /mnt -
Create directories for partitions:
$ mkdir /mnt/boot $ mkdir /mnt/home -
Mount the other partitions
$ mount /dev/sda1 /mnt/boot $ mount /dev/sda4 /mnt/home
Install steps
1. Run the install command with pacstrap
$ pacstrap /mnt base base-devel linux linux-firmware nano
2. Generate fstab file and Chroot to the disk
-
Generate an fstab file:
$ genfstab -U /mnt >> /mnt/etc/fstab -
Chroot into the disk
$ arch-chroot /mnt
Post install steps
1. Set Time Zone
-
Check Region and City:
$ ls /usr/share/zoneinfo # Get the REGION $ ls /usr/share/zoneinfo/REGION # Get the CITY -
Set Region and City
$ ln -sf /usr/share/zoneinfo/REGION/CITY /etc/localtime -
Run hwclock to generate
/etc/adjtime:
$ hwclock --systohc
2. Setup localization
-
Edit
/etc/locale.genand uncomment the locales you may need:
$ nano /etc/locale.genExample for
/etc/locale.gen:
en_US.UTF-8 UTF-8 sv_SE.UTF-8 UTF-8 -
Generate the locales:
$ locale-gen -
Create and setup the
/etc/locale.conffile:
$ nano /etc/locale.confExample for
/etc/locale.conf:
LANG=en_US.UTF-8 -
Set keyboard layout:
$ nano /etc/vconsole.confExample for
/etc/vconsole.conf:
KEYMAP=sv-latin1
3. Network configuration
-
Install and enable
networkmanager:
$ pacman -S networkmanager $ systemctl enable NetworkManager -
Create the
/etc/hostnamefile:
$ nano /etc/hostname.confExample for
/etc/hostname:
hostname # change to your liking -
Edit the
/etc/hostsfile:
$ nano /etc/hostsExample for
/etc/hosts: Change "hostname" to your hostname
# Static table lookup for hostnames. # See hosts(5) for details. 127.0.0.1 localhost ::1 localhost 127.0.1.1 hostname.localdomain hostname
4. Root password
-
Set a root password
$ passwd
5. Setup a bootloader 'GRUB'
-
Install
grub
$ pacman -S grub $ grub-install --target=i386-pc /dev/sda -
Configure
grub
$ grub-mkconfig -o /boot/grub/grub.cfg-
If you get this warning:
Warning: os-prober will not be executed to detect other bootable partitions. Systems on them will not be added to the GRUB boot configuration. Check GRUB_DISABLE_OS_PROBER documentation entry. doneEdit the
/etc/default/grubfile:
$ nano /etc/default/grub-
Add this line:
GRUB_DISABLE_OS_PROBER=falseExample for /etc/default/grub:
Then run this again:
$ grub-mkconfig -o /boot/grub/grub.cfg -
-
6. Setup a user
-
Create the user:
useradd -m -G wheel user #change user -
Set a user password:
$ passwd user -
Edit the
sudoconfig so users of thewheelgroup can use sudo:
$ EDITOR=nano visudo- Find the line where it says "
# %wheel ALL=(ALL) ALL" and uncomment it.
- Find the line where it says "
7. Exit and shutdown
-
Exit from
chroot:
$ exit -
Unmount the disk:
$ umount -R /mnt -
Shutdown the computer:
$ shutdown now
8. Done!
You can now remove the install media and boot into your newly made arch install and be prompted with a login.
| BTW I use Arch |
|---|
![]() |


Top comments (0)