├── sway.sh ├── base.sh └── README.md /sway.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | sudo timedatectl set-ntp true 4 | sudo hwclock --systohc 5 | 6 | sudo reflector -a 12 --sort rate --save /etc/pacman.d/mirrorlist 7 | sudo pacman -Syy 8 | 9 | sudo firewall-cmd --add-port=1025-65535/tcp --permanent 10 | sudo firewall-cmd --add-port=1025-65535/udp --permanent 11 | sudo firewall-cmd --reload 12 | # sudo virsh net-autostart default 13 | 14 | echo "MAIN PACKAGES FOR SWAY" 15 | 16 | # install DE packages from offical repos: 17 | 18 | # Window Manager Sway 19 | sudo pacman -S --noconfirm sway 20 | # App Launcher 21 | sudo pacman -S --noconfirm wofi 22 | # Theme customization package 23 | sudo pacman -S --noconfirm lxappearance qt5ct 24 | # Theme color generator 25 | sudo pacman -S --noconfirm python-pywal 26 | # Status Bar 27 | sudo pacman -S --noconfirm waybar 28 | # File manager 29 | sudo pacman -S --noconfirm pcmanfm-qt 30 | # Password manager 31 | sudo pacman -S --noconfirm pass 32 | # CLI to display system specs 33 | sudo pacman -S --noconfirm neofetch 34 | # System notifications manager 35 | sudo pacman -S --noconfirm dunst 36 | # Idle manager 37 | sudo pacman -S --noconfirm swayidle 38 | # Compatibility layer between xorg and wayland 39 | sudo pacman -S --noconfirm xorg-xwayland 40 | # Compatibility layer between Qt and wayland 41 | sudo pacman -S --noconfirm qt5-wayland 42 | # Web Browser 43 | sudo pacman -S --noconfirm firefox-developer-edition 44 | 45 | # install paru 46 | pacman -S --needed base-devel 47 | git clone https://aur.archlinux.org/paru.git 48 | cd paru 49 | makepkg -si --noconfirm 50 | cd .. 51 | 52 | # install DE packages from AUR: 53 | 54 | # Screenlock 55 | # Login Manager 56 | # System backup & restore tool 57 | # Terminal emulator 58 | 59 | paru -S --noconfirm swaylock-effects ly timeshift timeshift-autosnap foot 60 | 61 | # enable login screen on boot 62 | sudo systemctl enable ly.service 63 | sudo systemctl disable getty@tty2.service 64 | 65 | # Default Configuration 66 | 67 | mkdir -p .config/{sway,dunst,waybar,wofi} 68 | 69 | install -Dm755 /etc/sway/config ~/.config/sway/config 70 | install -Dm755 /etc/dunst/dunstrc ~/.config/dunst/dunstrc 71 | install -Dm755 /usr/share/foot/foot.ini ~/.config/foot/foot.ini 72 | 73 | touch ~/.config/waybar/config 74 | touch ~/.config/wofi/config 75 | 76 | # config for ly: /etc/ly/config.ini 77 | 78 | # install a Nerd Font patched version of JetBrains Mono 79 | paru -S --noconfirm nerd-fonts-jetbrains-mono 80 | 81 | printf "\e[1;32mCHANGE NECESSARY FILES BEFORE REBOOT, THEN RUN REBOOT COMMAND\e[0m" 82 | -------------------------------------------------------------------------------- /base.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # set system time 4 | ln -sf /usr/share/zoneinfo/Europe/Moscow /etc/localtime 5 | hwclock --systohc 6 | sed -i '177s/.//' /etc/locale.gen 7 | locale-gen 8 | 9 | # set keyboard layout 10 | echo "LANG=en_US.UTF-8" >> /etc/locale.conf 11 | echo "arch" >> /etc/hostname 12 | 13 | # set local host address 14 | echo "127.0.0.1 localhost" >> /etc/hosts 15 | echo "::1 localhost" >> /etc/hosts 16 | echo "127.0.1.1 arch.localdomain arch" >> /etc/hosts 17 | 18 | # set root password 19 | echo root:password | chpasswd 20 | 21 | # install packages for booting 22 | pacman -S grub grub-btrfs efibootmgr 23 | 24 | # install packages for network 25 | pacman -S networkmanager network-manager-applet wpa_supplicant 26 | 27 | # install DOS filesystem utilities & disk tools 28 | pacman -S mtools dosfstools os-prober 29 | 30 | # install shell dialog box, arch mirrorlist 31 | pacman -S dialog reflector 32 | 33 | # install linux system group packages 34 | pacman -S base-devel linux-headers 35 | 36 | # install user directories & command line tools 37 | pacman -S xdg-user-dirs xdg-utils 38 | 39 | # install additional support network & dns packages, service discovery tools 40 | # pacman -S nfs-utils inetutils dnsutils openbsd-netcat iptables-nft ipset nss-mdns avahi 41 | 42 | # install bluetooth protocol stack packages 43 | pacman -S bluez bluez-utils 44 | 45 | # install support packages & drivers for printers 46 | # pacman -S cups hplip 47 | 48 | # install sound system packages 49 | pacman -S alsa-utils pipewire pipewire-alsa pipewire-pulse pipewire-jack pavucontrol 50 | 51 | # install SSH protocol support & sync packages 52 | pacman -S openssh rsync 53 | 54 | # install support for battery, power, and thermals 55 | pacman -S acpi acpi_call tlp acpid 56 | 57 | # install support for Virtual machines & emulators 58 | # virt-manager qemu qemu-arch-extra edk2-ovmf bridge-utils dnsmasq vde2 59 | 60 | # install firewall support 61 | pacman -S firewalld 62 | 63 | # install GRUB as bootloader 64 | grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB 65 | grub-mkconfig -o /boot/grub/grub.cfg 66 | 67 | # For Discrete Graphics Cards 68 | # pacman -S --noconfirm xf86-video-amdgpu 69 | # pacman -S --noconfirm nvidia nvidia-utils nvidia-settings 70 | 71 | # enable services to always start at system boot 72 | systemctl enable NetworkManager 73 | # systemctl enable bluetooth 74 | # systemctl enable cups.service 75 | systemctl enable sshd 76 | # systemctl enable avahi-daemon 77 | systemctl enable tlp 78 | systemctl enable reflector.timer 79 | systemctl enable fstrim.timer 80 | 81 | # enable for virtualization 82 | # systemctl enable libvirtd 83 | 84 | systemctl enable firewalld 85 | systemctl enable acpid 86 | 87 | # add user and give priviliges 88 | useradd -m example-user 89 | echo example-user:password | chpasswd 90 | 91 | # give user ownership for virtualization 92 | # usermod -aG libvirt example-user 93 | 94 | echo "example-user ALL=(ALL) ALL" >> /etc/sudoers.d/example-user 95 | 96 | # set environment variables to use Wayland 97 | echo "QT_QPA_PLATFORM=wayland" >> /etc/environment 98 | echo "QT_QPA_PLATFORMTHEME=qt5ct" >> /etc/environment 99 | echo "MOZ_ENABLE_WAYLAND=1" >> /etc/environment 100 | echo "MOZ_WEBRENDER=1" >> /etc/environment 101 | echo "XDG_SESSION_TYPE=wayland" >> /etc/environment 102 | echo "XDG_CURRENT_DESKTOP=sway" >> /etc/environment 103 | 104 | 105 | printf "\e[1;32mDone! Type exit, umount -a and reboot.\e[0m" 106 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Arch linux installation guide 2 | 3 | This guide is a convenient combination of [Offical Arch Linux Installation Guide](https://wiki.archlinux.org/title/Installation_guide) and [Ermanno's amazing guide](https://gitlab.com/eflinux/arch-basic). 4 | 5 | **Important:** This is an installation with the latest & greatest tools available (2021). For more robust installation (Xorg, Swap partition, etc.), please refer to my robust [Arch linux installation guide](https://github.com/arcbjorn/arc-robust-arch-linux-installation-guide). 6 | 7 | ### Minimal archlinux installation 8 | 9 | 1-11 steps 10 | 11 | - [BTRFS filesystem](https://btrfs.wiki.kernel.org/index.php/Main_Page) 12 | - [ZRAM](https://en.wikipedia.org/wiki/Zram) 13 | - [Pipewire](https://pipewire.org/) 14 | - [Wayland](https://wayland.freedesktop.org/) 15 | 16 | ### For full Desktop GUI 17 | 18 | 12 step 19 | 20 | Minimal Desktop GUI with native Wayland support installation: 21 | 22 | - [sway](https://github.com/swaywm/sway) (Window manager) 23 | - [ly](https://github.com/nullgemm/ly) (Login manager) 24 | - [firefox-developer-edition](https://www.mozilla.org/en-US/firefox/developer/) (Mozilla Firefox browser) 25 | - [wofi](https://hg.sr.ht/~scoopta/wofi) (App Launcher) 26 | - [lxappearance](https://archlinux.org/packages/community/x86_64/lxappearance/) (Theme customization for apps with GTK+ frontend) 27 | - [qt5ct](https://sourceforge.net/projects/qt5ct/) (Theme customization for apps with Qt frontend) 28 | - [python-pywal](https://github.com/dylanaraps/pywal) (Theme color generator) 29 | - [waybar](https://github.com/Alexays/Waybar) (Status bar) 30 | - [pcmanfm-qt](https://github.com/lxqt/pcmanfm-qt) (File manager) 31 | - [pass](https://www.passwordstore.org/) (Password manager) 32 | - [foot](https://codeberg.org/dnkl/foot) (Terminal emulator) 33 | - [neofetch](https://github.com/dylanaraps/neofetch) (CLI to display system specs) 34 | - [dunst](https://github.com/dunst-project/dunst) (System notifications manager) 35 | - [timeshift](https://github.com/teejee2008/timeshift) (System backup & restore tool) 36 | - [xorg-xwayland](https://wayland.freedesktop.org/xserver.html) (Compatibility layer between Xorg and Wayland) 37 | - [qt5-wayland](https://wiki.qt.io/QtWayland) (Compatibility layer between Qt and Wayland) 38 | - [swayidle](https://github.com/swaywm/swayidle) (Idle manager) 39 | - [swaylock-effects](https://github.com/mortie/swaylock-effects) (Screenlock) 40 | 41 | ### Installation 42 | 43 | 1. Boot from USB drive with Arch ISO 44 | 45 | 2. Prepare the disk (partitions) - using GPT device 46 | 47 | ```bash 48 | # check the disks 49 | lsblk 50 | 51 | # partition the disk - create GPT Labels 52 | gdisk /dev/*** 53 | 54 | # choose new GPT Label command: 55 | o 56 | 57 | # First Partition for EFI 58 | # choose new command: 59 | n 60 | # choose default partition number 61 | # choose default First Sector memory 62 | # choose Last Sector memory: 63 | +550M 64 | # enter the EFI partition code: 65 | ef00 66 | 67 | # Second Partition for main SSD storage 68 | # choose new command 69 | n 70 | # choose default partition number 71 | # choose default First Sector memory 72 | # choose Last Sector memory: 73 | (remaining SSD space - 2 GB)G 74 | # choose default partition type (Linux Filesystem) 75 | 76 | # Choose "write" command to overwrite exiting partitions: 77 | w 78 | ``` 79 | 80 | 3. Format partitions 81 | 82 | ```bash 83 | # make fat32 filesystem for EFI 84 | mkfs.vfat /dev/***1 85 | # make butterFS filesystem for main storage 86 | mkfs.btrfs /dev/***2 87 | ``` 88 | 89 | 3. ButterFS configuration 90 | 91 | ```bash 92 | # mount main partition - root subvolume 93 | mount /dev/***2 /mnt 94 | 95 | cd /mnt 96 | # make btrFS subvolume for root subvolume 97 | btrfs subvolume create @ 98 | # make btrFS subvolume for home subvolume 99 | btrfs subvolume create @home 100 | # make btrFS subvolume for var subvolume 101 | btrfs subvolume create @var 102 | 103 | cd 104 | # unmount main partition - root subvolume 105 | umount /mnt 106 | 107 | # mount root subvolume 108 | mount -o noatime, compress=zstd, space_cache,discard=async,subvol=@ /dev/***2 /mnt 109 | 110 | # directories var, home & var 111 | mkdir -p /mnt/boot/efi 112 | mkdir /mnt/{home,var} 113 | 114 | # mount home & var subvolumes 115 | mount -o noatime, compress=zstd, space_cache,discard=async,subvol=@home /dev/***2 /mnt/home 116 | 117 | mount -o noatime, compress=zstd, space_cache,discard=async,subvol=@var /dev/***2 /mnt/var 118 | ``` 119 | 120 | 4. Mount EFI partition 121 | 122 | ```bash 123 | mount /dev/***1 /mnt/boot/efi 124 | ``` 125 | 126 | 5. Install the base system 127 | 128 | ```bash 129 | # for amd processor: amd-ucode instead of intel-ucode 130 | pacstrap /mnt base linux linux-firmware git vim intel-ucode btrfs-progs 131 | ``` 132 | 133 | 6. Generate filesystem table 134 | 135 | ```bash 136 | genfstab -U /mnt >> /mnt/etc/fstab 137 | ``` 138 | 139 | 7. Make new root directory with all mounts needed 140 | 141 | ```bash 142 | # detach from main filesystem and process tree 143 | arch-chroot /mnt 144 | 145 | # check the fs & table 146 | ls 147 | cat /etc/fstab 148 | ``` 149 | 150 | 8. Run base archlinux system intall script 151 | 152 | ```bash 153 | # give exec permissions to script 154 | git clone https://github.com/arcbjorn/arc-arch-linux-installation-guide 155 | cd arc-arch-linux-installation-guide 156 | # don't forget to change username & password to yours :) 157 | chmod +x base.sh 158 | 159 | # run from root filesystem 160 | cd / 161 | ./arc-arch-linux-installation-guide/base.sh 162 | 163 | # choose xdr-desktop-portal-wlr (to use with Sway) 164 | ``` 165 | 166 | 9. Check system init config 167 | 168 | ```bash 169 | vim /etc/mkinitcpio.conf 170 | # if butterFS used on 2 disks - put "btrfs" parameter in MODULES 171 | # if amd or nvidia card is used - put "amdgpu" or "nvidia" parameters in MODULES accordingly 172 | 173 | # if config was changed, recreate initramfs: 174 | mkinitcpio -p linux 175 | ``` 176 | 177 | 10. Finish base packages installation 178 | 179 | ```bash 180 | exit 181 | umount -a 182 | reboot 183 | ``` 184 | 185 | 11. Install Desktop GUI & tools 186 | 187 | ```bash 188 | # copy the guide from root filesystem to home repository 189 | cp -r /arc-arch-linux-installation-guide . 190 | cd /arc-arch-linux-installation-guide 191 | 192 | # give exec permissions to script 193 | chmod +x sway.sh 194 | 195 | # go back to home directory 196 | cd .. 197 | ./arc-arch-linux-installation-guide/sway.sh 198 | ``` 199 | 200 | 12. Configure ZRAM (used for SWAP) 201 | 202 | ```bash 203 | paru -S zramd 204 | sudo systemctl enable --now zramd.service 205 | 206 | # check the block devices table 207 | lsblk 208 | 209 | reboot 210 | ``` 211 | 212 | ### Enjoy your fresh system :) 213 | --------------------------------------------------------------------------------