How to install Archlinux
⚠️ Now Archlinux embeeds an install script which you can run with
archinstall, this blog post is here for curious people wanting to know how to install things from scratch and know how a Linux system works.
I recently installed Archlinux on my laptop, let me help you for a fresh new install, step by step, with all commands and tips I learnt.
After closing around 30-40 navigation pages on my phone after every new installation, I decided to take notes of my mistakes and the tips I learnt of my past experiences in this post.
Disclaimer: I based all my previous installations on the following, therefor some content will be very similar, if not the same.
- https://github.com/FredBezies/arch-tuto-installation/blob/master/install.md (🇫🇷)
- https://driikolu.fr/2020/03/install_arch_chiffre_uefi/ (🇫🇷)
I recommend to read the tips if you have an issue with something (
Ctrl-f should work), or want to learn a bit more.
I really love the minimalist mindset of Archlinux: install only what you need and what you want. You need to change something in particular? You know how to do it because you learnt how to install it before.
You are in total control of your installation and can customize it as needed. Without mentioning the AUR packages.
The first thing to get is a USB stick to make it bootable and store the ISO on it.
After some time, you get your USB bootable. Boot your computer on it to install Archlinux.
⚠️ I have an Nvidia graphics card (too recent to be supported) and needed to add the
nomodesetflag on boot because of screen glitches.
We first want to create our partitions. Make sure to get your disk label with
We will create 4 partitions:
Those values are arbitrary, change them at your own risks.
Create filesystem on the partitions:
You want now to set your NTP:
We will now mount our partitions on the system and install basic packages on it.
Reffer to the partitions table
Let’s install basic packages using
If your ISO is old, you will have to update your keyring because some PGP signatures could be missing/expired.
You will want to add
nvidiaif you have such card. Or even your favourite text editor.
We can now generate our fstab:
⚠️ Do not forget to install
dhclientif you want Internet access after reboot
We can now edit our configuration:
Set your locales:
We can now set a password for the
Let’s install Grub for the boot manager:
Setup the kernel modules and install Grub on the system:
Your system is now ready to work. Congratulations, you can now reboot the machine and unplug the USB stick!
We do not want to use
root user, we create a sudo user:
wheel group will be sudoer (using their password).
You may now need to use a graphical environment, I will show how to use the famous i3 and setup a basic status bar: polybar.
xorgif not installed yet
I will from now, exec commands as a regular user.
sudo -u user_name.
And voilà, i3 is now installed. It will start on next login, we will see for a connection manager in a moment.
You want a status bar? Polybar provide fast, easy to customize bars.
Once installed you can find cool themes at https://github.com/adi1090x/polybar-themes you will find installation and setup instructions on the repo.
You can add an entry for the bar to launch on login in your i3 config:
I use rofi for my application launcher and power menu, see https://github.com/adi1090x/rofi for more info.
Add a system bind on your config:
As its name says, lightdm is a lightweight package, it will allow you to setup your login page on startup.
Don’t forget to enable it with sysytemd:
systemctl enable lightdm.
BIOS update broke my setup
Yeah it appears that on a BIOS update, you can break your grub config. It happened to me every time as I run a dual boot alongside W*ndows. Jokes apart, it is very easy to fix things.
The main issue encountered is the disapearance of Grub and so, your Arch partition. Fear not, you can fix it in only 2 steps:
- Find your bootable stick and boot on it
- Follow the steps:
And you can reboot.
Dual boot with windows
My grub did not detect my Windows partition, this post helped me to solve the issue.
- Something is broken? You forgot to install an important package but already completed all the steps? Do not reinstall from scratch! Just boot on your USB, mount your system back and
- If using Nvidia card, set
nomodeseton boot if screen tearing/glitch
- Make sure to have some space for the root partition, even 32GB is tight sometimes
- Update your pacman’s keyring if the ISO is old with
pacman-key --populate archlinux
- Make sure to install
dhclientand a network manager to access the Internet
- Disable the computer speaker BEEP:
echo blacklist pcspkr > /etc/modprobe.d/nobeep.conf
If you find something broken here, feel free to send an issue on the Github repo.
As I am in some distro reinstallation process, I will update this notes on the fly.