Make sure you have an internet connection.
ping 8.8.8.8
Now you can either use the installation script from this repository by cloning it and executing, or simple go through each of the steps.
git clone https://github.com/jmpargana/Dotfiles
./Dotfiles/.scripts/arch-install.sh
- Load keyboard layout
loadkeys de-latin1
- Update system clock
timedatectl set-ntp true
- Create the partitions
A good and simple layout would be: 1. Boot - 512Mb 2. Swap - 8Gb 3. Root - Remaining
- Setup the partitions
The -L flag creates a label, which will be usefull later with the booting system.
mkfs.ext4 -L p_arch /dev/nvme0n1p3
mkswap -L p_swap /dev/nvme0n1p2
mkfs.fat -F 32 -n EFIBOOT /dev/nvme0n1p1
- Mount the partitions
mount -L p_arch /mnt
swapon -L p_swap
mkdir -p /mnt/boot
mount -L EFIBOOT /mnt/boot
- Prepare Mirrors for Germany
cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak
grep -E -A 1 ".*Germany.*$" /etc/pacman.d/mirrorlist.bak | sed '/--/d' > /etc/pacman.d/mirrorlist
- Install base system
pacstrap /mnt base base-devel linux linux-firmware vim
- Other needed packages
pacman --root /mnt -S dhcpcd bash-completion intel-ucode wpa_supplicant netctl dialog efibootmgr dosfstools gptfdisk
- Generate fstab
genfstab -Up /mnt > /mnt/etc/fstab
- Enter /mnt
arch-chroot /mnt/
- Add hostname
echo icm > /etc/hostname
- Setup language
echo LANG=en_US.UTF-8 > /etc/locale.conf
#delete line /etc/locale.gen
locale-gen
- Keyboard layout
echo KEYMAP=de-latin1 > /etc/vconsole.conf
echo FONT=lat9w-16 >> /etc/vconsole.conf
- Datetime
ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime
hwclock --systohc
- Setup hosts
echo archlinuxthinkpad > /etc/hostname
cat >> /etc/hosts <<EOF
127.0.0.1 localhost
::1 localhost
127.0.1.1 archlinuxthinkpad.localdomain archlinuxthinkpad
EOF
- Generate initramfs
mkinitcpio -p linux
- Create root and user passwd
echo "Type root password:"
passwd
useradd -m -G wheel,storage,power -s /bin/bash icm
echo "Type icm password:"
passwd icm
EDITOR=vim visudo
- Automatically update time
systemctl enable --now systemd-timesyncd.service
hwclock -w
- Setup Bootloader
bootctl install
cat > /boot/loader/loader.conf <<EOF
default arch-uefi
timeout 0
EOF
cat > /boot/loader/entries/arch-uefi.conf
title Arch Linux
linux /vmlinuz-linux
initrd /intel-ucode.img
initrd /initramfs-linux.img
options root=LABEL=p_arch rw resume=LABEL=p_swap quiet loglevel=3 rd.udev.log_priority=3
EOF
cat > /boot/loader/entries/arch-uefi-fallback.conf
title Arch Linux Fallback
linux /vmlinuz-linux
initrd /intel-ucode.img
initrd /initramfs-linux-fallback.img
options root=LABEL=p_arch rw resume=LABEL=p_swap quiet loglevel=3 rd.udev.log_priority=3
EOF
- Exit and reboot
exit
umount -R /mnt
reboot
After you reboot and setup the internet connection again, you can either run the post installation script or setup the next steps one by one:
git clone https://github.com/jmpargana/Dotfiles
./Dotfiles/.scripts/arch-post-install.sh
- Get AUR package manager
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
- Setup Xorg and WMs
Install all xorg needed
sudo pacman -S xorg-server xorg-xinit xorg-drivers xterm alacritty
Followed by the intel video drivers
sudo pacman -S xf86-video-intel xf86-input-synaptics mesa
Set the keymap in xorg
localectl set-x11-keymap de pc105 nodeadkeys
Install additional fonts
sudo pacman -S ttf-dejavu
Configure sound cards.
sudo pacman -S alsa-utils
gpasswd -a icm audio
Prepare power interface for laptop.
sudo pacman -S acpid
sudo systemctl enable acpid
sudo systemctl start acpid
Finally install all packages for window managers
sudo pacman -S i3status rofi feh openbox ttf-dejavu ttf-liberation ttf-font-awesome
- Setup Display Manager
sudo pacman -S lightdm
yay -S lightdm-webkit-theme-aether
sudo systemctl enable lightdm.service
- Load Configs and Betterlockscreen
Get all other programs.
sudo pacman -S firefox thunderbird vlc keepassxc telegram-desktop thunar ranger
yay -S spotify
Install zsh or fish.
- Basic Programming Packages
The rest should be installed either with a docker container or inside a virtual environment for any given project.
# Python
sudo pacman -S python-pip
pip install --upgrade pip
pip install pipenv
# C++
sudo pacman -S g++ gcc make cmake clang llvm the_silver_searcher dash fzf
# JS
sudo pacman -S nodejs npm yarn
# Latex
sudo pacman -S texlive-most texlive-lang biber
# Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- Setup Docker
sudo pacman -S docker
sudo systemctl enable docker.service
sudo systemctl start docker.service
groupadd docker
gpasswd -a icm docker
-
Generate SSH Key
- Install openssh
sudo pacman -S openssh
- Generate key
ssh-keygen -t rsa -b 4096 -C "icmjmp@protonmail.ch"
- Add to ssh-agent
eval "$(ssh-agent -s)" ssh-add ~/.ssh/id_rsa
-
Start Firewall
-
Install VPN