Easy arch linux setup for folks who want to keep it simple.
- UEFI firmware laptop/PC. This guid does not cover BIOS specific installation.
- Internet connection. If you use cable make sure its plugged.
- Flash drive.
- No encryption
- No fancy filesystems
- No wayland
- No fancy window managers
- GNOME desktop environment
Note that this is just walk torugh guide to do MY installation. If you are really into installing the arch way read
- GPT partition UEFI mode installation
- Full disk encryption
- EFI boot using GRUB
- LVM on LUKS partition scheme
- Minimal system configuration including intel-ucode or amd-ucode update
There is lots of information how to create bootable arch linux flash over the internet, but I find the official wiki the most complete.
In the end you want to end up having latest verified
ISO flashed and ready to boot.
- Inser the USB into your PC/laptop.
- Enter boot selection menu. You need to press key combination specific for your device. Refer to your device manual.
- Select the USB as a device you wish to boot from the menu.
Now you will be presented with the arch linux menu. Select boot arch linux
option.
After couple of seconds you should already be logged into the shell.
By default we have the US layout, so if its fine by you skip this step.
There are 200+ keyboard layouts out there to choose from.
You can list them with
ls /usr/share/kbd/keymaps/**/*.map.gz
When you find the desired kayboard layout set it with
loadkeys <layout-name>
This step is to ensure that you actually have UEFI firmware
ls /sys/firmware/efi/efivars
If nothig lists then you can't proceed with this guide, because we'll be doing UEFI specific stuff.
Before proceeding make sure that your network interfaces are listed and working
ip link
If you are using ethernet cable then it should be automatically connected.
Verify by ping google.com
.
Enter the wifi shell with iwctl
List available wifi devices with device list
and remember the name of your deisred device.
Usually its wlan0
Now scan all available access points with station <wifi-device-name> scan
. This command does
not return result, but instead populates in the file system list of available networks.
You can see the networks in the list with station <wifi-device-name get-networks
.
Pick the desired network name and connect to it with you desired network device
station <wifi-device-name> connect "<network-name>"
Now exit the shell and verify connectivity by ping google.com
.
We need to ensure that system clock is acurate and synchronisation is enabled
timedatectl set-ntp true
. This enables automatic synchronization of the system clock with a remote server using the NTP (Network Time Protocol).
We'r about to format, partition and mount our devices. The below layout will be used
EFI Purpose: OS boots from here. Size: 550M Type: ESP FS: FAT32 Mount:
Root Purpose: The top-level directory of the filesystem. Contains all of the files required to boot the Linux system before other filesystems are mounted. Size: 30G (it might be lower in your case) Type: Linux filesystem FS: Ext4
Swap Purpose: Used when we don't have enough RAM to increase the virtual memory capacity. I'm using it only for hybernation, because swapping is slow. Size: 33G (RAM + 1G so we can hybernate) Type: Linux swap FS: N/A
Home Purpose: For user home directories. Contains user-specific configuration files, caches, application data and media files. Size: What is left Type: Linux filesystem FS: Ext4
First lets get the name of the disk we want to partition.
List your disks with lsblk
command and you can se what is the name of your device. In my case its nvme0n1. In your case it may be sda1 or something.
Lets create partitions using the cgdisk
util.
Type cgdisk /dev/<your fisk>
.
Lets now create our EFI partition.
Select the Free space and press [ NEW ]
Press enter for default first sector. Input 550M
and press enter for size.
Input ef00
(ESP type) and press enter. Now type ESP
for name and press enter.
Proceeding with Root partition.
Select the Free space and press [ NEW ]
Press enter for default first sector. Input 30G
and press enter for size.
Press enter for default Linux partition. Now type Root
for name and press enter.
Proceeding with SWAP.
Select the Free space and press [ NEW ]
Press enter for default first sector. Input 33G
and press enter for size.
Input 8200
(Linux swap type) and press enter. Now type Swap
for name and press enter.
Finally we create the Home.
Select the Free space and press [ NEW ]
Press enter for default first sector. Press enter to allocate all remaining size.
Press enter for default Linux partition. Now type Home
for name and press enter.
Now select [ Write ] then yes
and [ Quit ].
Verify everything looks as we wanted by listing your devices with lsblk
.
Now lets format the partitions we created
mkfs.fat -F32 /dev/<efi partition name> # formats fat 32 the EFI
mkfs.ext4 /dev/<root partition name> # formats ext4 the root
mkfs.ext4 /dev/<home partition name> # formats ext4 the home
mkswap /dev/<swap partition name> # creates swap
mount /dev/<root partition name> /mnt # mount first the root
mkdir /mnt/home #make dir to mount the home onto
mount /dev/<home partition name> /mnt/home/ # mount the home
swapon /dev/<swap partition name> # activates swap
pacstrap /mnt base linux linux-firmware vim
Create the table genfstab -U /mnt >> /mnt/etc/fstab
.
Verify recrods are written cat /mnt/etc/fstab
.
We want to start working in /mnt as root dir.
arch-chroot /mnt
Create symlink to localtime for the desired timezone.
In my case it /Europe/Sofia.
ln - sf /usr/share/zoneinfo/<Continent>/<City> /localtime
.
Now sync the hardware clock.
hwclock --systohc
.
Edit locale gen and uncomment the desired locales for later generation. In my case i'm ucommenting en_US.UTF-8 UTF-8
.
vim /etc/locale.get
.
Generate the locale data locale-gen
Add you locale to the conf. In my case its LANG=en_US.UTF-8
vim /etc/locale
Pick you desired hostname eg myarch.
echo <you hostname> >> /etc/hostname
.
Open hosts file
vim etc/hosts
Add the following content
127.0.0.1 localhost
::1 localhost
127.0.1.1 <hostname>.localdomain <hostname>
Initramfs is an initial ram file system based on tmpfs. It contains the tools and scripts required to mount the file systems before the init binary on the real root file system is called.
Run the mkinitcpio -P
script to create an initial ramdisk environment.
We'r going to install
grub
Bootloader - loads OS kernels.base-devel
Tools for building (compiling, linking)efibootmgr
CLI tool to modify the EFI boot manager - can destroy, reorder etc boot entries.linux-headers
Headers are part of the kernel, but shipped separately. They are interface between user space and the kernelnetworkmanager
Network servcie for managing devices & connectionsnm-connection-editor
App to add, remove, and modify network connections stored by NetworkManagerpulseaudio
Sound server & proxy.pavucontrol
Volume control tool for pulseaudio.dialog
Display messages from shell to dialog boxwireless_tools
Utilities for wifi ^^ should be new ones for the new audio shit.. PAV pipiwire pulse..
mkdir /boot/EFI
mount /dev/<efi parition name> /boot/EFI
mkdir /boot/EFI
mount /dev/<efi parition name> /boot/EFI
Here we'r using x86. Check yours.
grub-install --target=x86_64-efi --bootloader-id=grub_uefi --recheck
grub-mkconfig -o /boot/grub/grub.cfg
systemctl enable NetworkManager
useradd -a -G wheel <your user name>
EDUTIR=vim visudo
Now uncomment wheel ALL=(ALL) ALL
to enable users of this wheel to use sudo.
passwd <your user name>
passwd root
Now pick one of these depending on your video card vendor
xf86-video-intel
for Intelxf86-video-amdgpu
for AMDnvidia nvidia-utils
for NVIDIA
Now install the driver with pacman -S <driver name>
pacman -S xorg
I'm preferring GNOME for this.
pacman -S gnome
pacman -S gnome-tweaks
Enable the gnome display managetr systemctl enable gdm
Exit root exit
and unmount partitions umount -a
and reboot