By default it’s a US layout.
To change:
ls /usr/share/kbd/keymaps/–/-.map.gz (replace the - with asterisk)
loadkeys layoutFileWithoutExtension ex: loadkeys fr-latin1 (french azerty layout)
If in need of a bigger font:
setfont ter-132b (132 is the size, b == bold, n for normal)
List font with ls /usr/share/kbd/consolefonts
Check if using UEFI or bios:
cat /sys/firmware/efi/fw_platform_size
if return 64 or 32: UEFI 64bit or 32bit if file does not exist: BIOS
Modern pc should be in UEFI
device list
device {device} set-property Powered on
station {device} scan
station {device} get-networks
station {device} connect {network name}
ping google.com
fdisk -l Loop0 can be ignore
For MBR, see wiki
For GPT table, the basic partition layout is:
| mount point | partition | type | size |
|---|---|---|---|
| /boot or /efi | /dev/sda1 | EFI system partition | 300mib min |
| [swap] | /dev/sda2 | Linux swap | 512mib min |
| / | /dev/sda3 | Linux (or Linux x86-64 root) | remaining space |
Note for a nvme it would be nvme0n1, nvme0n2…
A separate /home partition can also be used. In that case allocate around 20gib (30 max) for the root and give the rest to the home in sda4.
Use fdisk with the desire disk:
fdisk /dev/sda (or nvme0n, sdb…)
!! When selecting the type, double check the number with
L
gn to create new partition1t then 1 for efin, then enter if num is 2, then enter for first sectort, check that the part 2 is selected82 (or 19) for linux swapn, then enter if num is 3, then enter for first sectort, check that the part 3 is selected83 (20) for Linux file systemw to save the changesEach newly created partition must be formatted
For EFI: mkfs.fat -F32 /dev/efi_partition
mkfs.fat -F32 /dev/sda1
For swap: mkswap /dev/swap_partition
mkswap /dev/sda2
For the root partition and home: mkfs.ext4 /dev/root_partition
mkfs.ext4 /dev/sda3
For the root:
mount /dev/root_partition /mnt
For the EFI boot:
mount –mkdir /dev/efi_partition /mnt/boot/efi or mount –mkdir /dev/efi_partition /mnt/boot
For swap (! it’s not using mount):
swapon /dev/swap_partition
For home:
mount –mkdir /dev/home_partition /mnt/home
pacstrap -K /mnt base linux linux-firmware
It define how partition are mounted
genfstab -U /mnt » /mnt/etc/fstab
arch-chroot /mnt
pacman -S networkmanager neovim vim git sudo iwd firefox kitty…
Enable networkmanager:
systemctl enable NetworkManager
!! Check if a firmware is needed for the wifi card, check the name of the card:
lspci -k (look for network controller) then google it or look this page
ln -sf /usr/share/zoneinfo/Europe/Paris /etc/localtime hwclock –systohc
Edit /etc/locale.gen and uncomment the needed locales.
Uncomment en_US.UTF-8 UTF-8
and/or fr_FR.UTF-8 UTF-8
Then generate the locales file with:
locale-gen
Set the hostname by creating /etc/hostname file and typing the hostname in it.
Note: this is not the username
Set a root password with:
passwd
Create a user (-m -> create /home, -G -> group list)
useradd -m -G wheel [username]
Set password
passwd [username]
Let user use sudo (sudo must be installed)
usermod -aG wheel
(if you haven't had it in the user creation) visudo uncomment %wheel ALL=(ALL:ALL) ALL (don't uncomment the one that does not ask for passwd)
In efi:
pacman -S grub efibootmgr pacman -S amd-ucode // or intel-ucode grub-install –target=x86_64-efi –efi-directory=/boot/efi –bootloader-id=GRUB grub-mkconfig -o /boot/grub/grub.cfg
If it says: ‘efibootmgr not found’ -> pacman -S efibootmgr
Note: the amd-ucode is optional but better to install amd microcode. It check for update for the cpu microcode (whatever that is).
pacman -S efibootmgr pacman -S amd-ucode // or intel-ucode bootctl –path=/boot install cd /boot/loader
Edit the entries directory and loader.conf file:
Loader.conf:
timeout 3 if you want to add a delay before starting the systemdefault arch-* (or modify the default entry if already one)Entries:
nvim arch.conftitle Arch Linux
linux /vmlinuz-linux
initrd /amd-ucode.img or intel-ucode.img
initrd /initramfs-linux.img
options root=PARTUUID=root-part-uid rw
To find the root partition uuid either:
echo “options root=PARTUUID=$(blkid -s PARTUUID -o value /dev/sdX2) rw” » /boot/loader/entries/arch.conf Just replace sdX2 with the correct root partition
Exit the chroot with exit
It’s better to umount all the partition with umount -R /mnt
Type reboot and remove the installation media
sudo pacman -S base-devel (git)
git clone https://aur.archlinux.org/yay-git.git
cd yay-git
sudo pacman -S fakeroot
makepkg -si
# install package like so:
yay -S packagename
sudo pacman -S xdg-user-dirs
xdg-users-dirs-update
Note: if you install a desktop environment, you might not have to install X11
exec i3
You can also install the necessary driver:
sudo pacman -S xf86-video-amdgpu sudo pacman -S xf86-video-intel Or nvidia
For sddm (should be the same for any dm):
Alsa should be installed by default. By default all channel are muted. To unmute:
amixer sset Master unmute
$ amixer sset Speaker unmute
$ amixer sset Headphone unmute
To use alsamixer:
sudo pacman -S alsa-utils
sudo pacman -S bluez bluez-utils
sudo systemctl enable bluetooth.service
sudo systemctl start bluetooth.service
See DNS security and setting up firewall in the arch wiki.
See wiki.