Get the Wiki ready!
-
Set the keymap to fit your keyboard layout with
loadkeys
. The default keymap is US. To list all available keymaps dols /usr/share/kbd/keymaps/**/*.map.gz
. -
To verify that UEFI was used, do
ls /sys/firmware/efi/efivars
. If the folder doesn't exist, UEFI wasn't used. -
Verify that you have an internet connection with
ping -c 4 www.google.com
. If planning to use wifi, use the wiki. -
Use
timedatectl set-ntp true
to make sure the system clock is accurate. You can verify it worked withtimedatectl status
. -
Identify the hard drive you're going to use for the installation with
lsblk
. I'm using/dev/sda
. -
Create a new GPT on the disk with
gdisk /dev/sda
, theno
and thenw
. -
Create the partitions with
cgdisk /dev/sda
. I've created an EFI partition (codeef00
), a SWAP partition (code8200
), and a root partition (code8300
). Don't forget to write your changes. -
Activate the SWAP partition with
mkswap /dev/sda2
and thenswapon /dev/sda2
. -
Format your other partitions. I used
mkfs.fat -F32 /dev/sda1
to format the EFI partition andmkfs.ext4 /dev/sda3
. -
Mount your root partition with
mount /dev/sda3 /mnt
and then mount the EFI partition withmkdir /mnt/boot
and thenmount /dev/sda1 /mnt/boot
. -
Update
/etc/pacman.d/mirrorlist
and install the base system withpacstrap -i /mnt base base-devel zsh zsh-completions git networkmanager openssh
. Addnvidia
to the list if you have an NVidia graphics card. -
Generate the fstab file with
genfstab -U /mnt >> /mnt/etc/fstab
. -
Chroot into your system with
arch-chroot /mnt
. -
Set your timezone. I live in Portugal so I'll do
ln -sf /usr/share/zoneinfo/Europe/Lisbon /etc/localtime
. I can see the other timezones withtzselect
. -
Set the hardware clock with
hwclock --systohc
. Make sure the hardware clock is using UTC. -
Uncomment the locales you're going to use with
nano /etc/locale.gen
. Update the file withlocale-gen
. -
Select the system language with one of the locales you uncommented using
echo LANG=en_US.UTF-8 > /etc/locale.conf
. -
Do
echo KEYMAP=us-acentos > /etc/vconsole.conf
to set the system keymap. Replaceus-acentos
with the keymap you used in the beginning. -
Set the hostname with
echo ArchBook > /etc/hostname
. ReplaceArchBook
with whatever you want. -
Do
nano /etc/hosts
and add the following lines to the file:
127.0.0.1 localhost.localdomain localhost
::1 localhost.localdomain localhost
127.0.0.1 ArchBook.localdomain ArchBook
::1 ArchBook.localdomain ArchBook
Change ArchBook
for the hostname you've choosen.
-
Enable Network Manager with
systemctl enable NetworkManager
. -
Enable OpenSSH with
systemctl enable sshd
. -
Create a new
initramfs
by doingmkinitcpio -p linux
. -
Do
passwd
to give the root user a password. -
Install refind with
pacman -S refind-efi
and install it withrefind-install --usedefault /dev/sda1 --alldrivers
. To make refind update itself, domkdir /etc/pacman.d/hooks
and thennano /etc/pacman.d/hooks/refind.hook
and add the following to the file:
[Trigger]
Operation=Upgrade
Type=Package
Target=refind-efi
[Action]
When=PostTransaction
Exec=/usr/bin/refind-install --usedefault /dev/sda1 --alldrivers
- Do
echo resume=$(blkid /dev/sda2 | cut -d ' ' -f 5 | tr -d '"') > /boot/refind_linux.conf
, thenecho root=$(blkid /dev/sda3 | cut -d ' ' -f 5 | tr -d '"') >> /boot/refind_linux.conf
and thennano /boot/refind_linux.conf
. Edit the file:
"Arch" "resume=PARTUUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX root=PARTUUID=YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY rw initrd=/intel-ucode.img initrd=/initramfs-linux.img quiet loglevel=3"
"Arch - CLI" "resume=PARTUUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX root=PARTUUID=YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY rw initrd=/intel-ucode.img initrd=/initramfs-linux.img systemd.unit=multi-user.target"
-
If using an Intel CPU do
pacman -S intel-ucode
. You can check your CPU withlscpu
. -
Do
exit
, thenumount -R /mnt
and thenpoweroff
.
-
Login with
root
and the password you set earlier. -
Change the shell with
chsh -s /bin/zsh
. -
Add a group for sudoers with
groupadd sudoers
. -
Add a user with
useradd -m -g sudoers -s /bin/zsh -c "Carlos Pinto" pill
. Changepill
for the username you want. -
Give your user a password with
passwd pill
. -
Do
EDITOR=nano visudo
and add%sudoers ALL=(ALL) ALL
on the a new line right afterroot ALL=(ALL) ALL
. -
Set your internet connection with
nmtui
. -
Do
nano /etc/pacman.conf
, uncomment the line#Color
and add in a new line after itILoveCandy
. Also uncomment the line#[multilib]
and the next one. Dopacman -Syyu
to update the settings. -
Logout and login with the user you created earlier.
-
Do the zsh configuration.
-
Install home directories and neofetch with
sudo pacman -S xdg-user-dirs neofetch
. -
Create a directory and enter it
mkdir aur && cd aur
. -
Clone
cower
andpacaur
withgit clone https://aur.archlinux.org/cower.git
andhttps://aur.archlinux.org/pacaur.git
. -
Enter the
cower
directorycd cower
and domakepkg -sri
. (If it fails, dogpg --recv-keys --keyserver hkp://pgp.mit.edu 1EB2638FF56C0C53
). -
Enter the
pacaur
directorycd ../pacaur
and domakepkg -sri
again. -
Go back to your home directory
cd
and remove the folder you createdsudo rm -r aur
. -
Do
pacaur -S oh-my-zsh-git
to install oh-my-zsh. -
Customize oh-my-zsh for the user and root.
-
Do
git clone https://github.com/PillTime/rEFInd-minimal-dark.git
and enter the foldercd rEFInd-minimal-dark
. Follow the instructions. -
After that, do
cd
and thensudo rm -r refind-minimal-dark
. -
Reboot the computer
reboot
.
-
Install
lightdm-webkit2-greeter accountsservice xorg-server xorg-apps xf86-video-intel mesa lib32-mesa i3-gaps rofi rxvt-unicode
. -
Enable lightdm (see the wiki page).
-
Install fonts
noto-fonts noto-fonts-cjk noto-fonts-emoji noto-fonts-extra otf-fira-code
. -
Install
neovim htop firefox feh gdb cgdb scrot youtube-dl
. -
Install
alsa-firmware alsa-utils alsa-oss alsa-plugins alsa-tools lib32-alsa-lib lib32-alsa-oss lib32-alsa-plugins
. -
Install
pulseaudio pulseaudio-alsa pulseaudio-equalizer pulseaudio-jack pulsemixer pulseaudio-ctl mpd ncmpcpp
. -
Customize
.zshrc
,.Xresources
,.config/nano/nanorc
,.config/nvim/init.vim
,.config/i3/config
,.config/mpd/mpd.conf
,.ncmpcpp/config
. -
Fazer
systemctl --user enable mpd
.