arch-install2047183
add markdown guide
+209 −0
1 file changed
- A arch_install.md +209 −0
| @@ -0,0 +1,209 @@ | |||
| 1 | + | # Arch Install | |
| 2 | + | ||
| 3 | + | ## Connect to Internet | |
| 4 | + | If you are using wifi, use [iwd](https://wiki.archlinux.org/title/Iwd) | |
| 5 | + | ``` | |
| 6 | + | device list | |
| 7 | + | station *device* get-networks | |
| 8 | + | station *d | |
| 9 | + | ``` | |
| 10 | + | ||
| 11 | + | ## Install Guide | |
| 12 | + | ||
| 13 | + | 1. Turn on parallel downloads | |
| 14 | + | ``sed -i "s/^#ParallelDownloads = 5$/ParallelDownloads = 15/" /etc/pacman.conf`` | |
| 15 | + | ||
| 16 | + | 2. Install archlinux keyring | |
| 17 | + | ``pacman --noconfirm -Sy archlinux-keyring`` | |
| 18 | + | ||
| 19 | + | 3. Load layout, set time | |
| 20 | + | ``` | |
| 21 | + | loadkeys us | |
| 22 | + | timedatectl set-ntp true | |
| 23 | + | ``` | |
| 24 | + | ||
| 25 | + | 4. Create ext4, efi, swap partition | |
| 26 | + | ``` | |
| 27 | + | lsblk | |
| 28 | + | cfdisk /dev/sdx or /dev/nvme0x | |
| 29 | + | ||
| 30 | + | # Efi partition | |
| 31 | + | mkfs.fat -F32 $efipartition | |
| 32 | + | ||
| 33 | + | # Swap partition | |
| 34 | + | mkswap $swappartition | |
| 35 | + | swapon $swappartition | |
| 36 | + | ||
| 37 | + | # ext4 partition | |
| 38 | + | mkfs.ext4 $partition | |
| 39 | + | ``` | |
| 40 | + | ||
| 41 | + | 5. Mount linux partition to /mnt | |
| 42 | + | ``mount $partition /mnt`` | |
| 43 | + | ||
| 44 | + | 6. Pacstrap | |
| 45 | + | ``` | |
| 46 | + | pacstrap /mnt base base-devel linux linux-firmware | |
| 47 | + | ``` | |
| 48 | + | ||
| 49 | + | 7. genstab | |
| 50 | + | ``` | |
| 51 | + | genfstab -U /mnt >> /mnt/etc/fstab | |
| 52 | + | ``` | |
| 53 | + | ||
| 54 | + | 8. chroot | |
| 55 | + | ``` | |
| 56 | + | arch-chroot /mnt | |
| 57 | + | ``` | |
| 58 | + | ||
| 59 | + | 9. set timezone | |
| 60 | + | ``` | |
| 61 | + | ln -sf /usr/share/zoneinfo/Asia/Kolkata /etc/localtime | |
| 62 | + | ``` | |
| 63 | + | ||
| 64 | + | 10. set hardware clock from system clock | |
| 65 | + | ``` | |
| 66 | + | hwclock --systohc | |
| 67 | + | ``` | |
| 68 | + | ||
| 69 | + | 11. set locale | |
| 70 | + | ``` | |
| 71 | + | echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen | |
| 72 | + | locale-gen | |
| 73 | + | echo "LANG=en_US.UTF-8" > /etc/locale.conf | |
| 74 | + | echo "KEYMAP=us" > /etc/vconsole.conf | |
| 75 | + | ``` | |
| 76 | + | ||
| 77 | + | 12. set hostname | |
| 78 | + | ``` | |
| 79 | + | echo $hostname > /etc/hostname | |
| 80 | + | echo "127.0.0.1 localhost" >> /etc/hosts | |
| 81 | + | echo "::1 localhost" >> /etc/hosts | |
| 82 | + | echo "127.0.1.1 $hostname.localdomain $hostname" >> /etc/hosts | |
| 83 | + | ``` | |
| 84 | + | ||
| 85 | + | 13. Initramfs | |
| 86 | + | ``` | |
| 87 | + | mkinitcpio -P | |
| 88 | + | ``` | |
| 89 | + | ||
| 90 | + | 14. Set root password | |
| 91 | + | ``` | |
| 92 | + | passwd | |
| 93 | + | ``` | |
| 94 | + | ||
| 95 | + | 15. install grub | |
| 96 | + | ``` | |
| 97 | + | pacman --noconfirm -S grub efibootmgr os-prober | |
| 98 | + | mkdir /boot/efi | |
| 99 | + | mount $efipartition /boot/efi | |
| 100 | + | ||
| 101 | + | grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=archlinux --recheck | |
| 102 | + | ||
| 103 | + | sed -i 's/quiet/pci=noaer/g' /etc/default/grub | |
| 104 | + | sed -i 's/GRUB_TIMEOUT=5/GRUB_TIMEOUT=0/g' /etc/default/grub | |
| 105 | + | ||
| 106 | + | grub-mkconfig -o /boot/grub/grub.cfg | |
| 107 | + | ``` | |
| 108 | + | ||
| 109 | + | 16. Install all the required user packages | |
| 110 | + | ``` | |
| 111 | + | pacman -S --noconfirm xorg-server xorg-xprop xorg-xkill xorg-xsetroot xorg-xinit \ | |
| 112 | + | noto-fonts noto-fonts-emoji noto-fonts-cjk ttf-jetbrains-mono-nerd ttf-font-awesome \ | |
| 113 | + | awesome-terminal-fonts bat libnotify dunst ntfs-3g \ | |
| 114 | + | jq mpv ncdu maim transmission-cli yt-dlp cowsay \ | |
| 115 | + | pacman-contrib pavucontrol rsync ripgrep ueberzug ffmpegthumbnailer python-pywal \ | |
| 116 | + | imlib2 xdotool xwallpaper zip unzip wget pcmanfm \ | |
| 117 | + | fzf man-db pipewire pipewire-pulse xcompmgr pamixer \ | |
| 118 | + | xclip sxhkd imagemagick lf connman wpa_supplicant git dash arc-gtk-theme papirus-icon-theme \ | |
| 119 | + | neovim lua rustup xdg-user-dirs mpd ncmpcpp unclutter \ | |
| 120 | + | zsh zsh-autosuggestions zathura zathura-pdf-poppler | |
| 121 | + | ``` | |
| 122 | + | ||
| 123 | + | 17. Enable networkmanager or connman | |
| 124 | + | ``` | |
| 125 | + | # network manager | |
| 126 | + | systemctl enable NetworkManager.service | |
| 127 | + | ||
| 128 | + | # connman | |
| 129 | + | systemctl enable connman.service | |
| 130 | + | ``` | |
| 131 | + | ||
| 132 | + | 18. set shell | |
| 133 | + | ``` | |
| 134 | + | rm /bin/sh | |
| 135 | + | ln -s dash /bin/sh | |
| 136 | + | ``` | |
| 137 | + | ||
| 138 | + | 20. Set user permissions | |
| 139 | + | ``` | |
| 140 | + | echo "%wheel ALL=(ALL:ALL) ALL" >> /etc/sudoers | |
| 141 | + | ``` | |
| 142 | + | ||
| 143 | + | 21. Create user | |
| 144 | + | ``` | |
| 145 | + | useradd -m -G wheel -s /bin/zsh $username | |
| 146 | + | passwd $username | |
| 147 | + | ``` | |
| 148 | + | ||
| 149 | + | 22. Setup dotfiles | |
| 150 | + | ``` | |
| 151 | + | cd $HOME | |
| 152 | + | git clone --separate-git-dir=$HOME/.dotfiles git@github.com:krolyxon/dotfiles.git tmpdotfiles | |
| 153 | + | rsync --recursive --verbose --exclude '.git' tmpdotfiles/ $HOME/ | |
| 154 | + | rm -r tmpdotfiles | |
| 155 | + | ``` | |
| 156 | + | ||
| 157 | + | 23. dwm : Window Manager | |
| 158 | + | ``` | |
| 159 | + | git clone --depth=1 git@github.com:krolyxon/dwm.git ~/.local/src/dwm | |
| 160 | + | sudo make -C ~/.local/src/dwm install | |
| 161 | + | ``` | |
| 162 | + | ||
| 163 | + | 24. dwmblocks: statusbar | |
| 164 | + | ``` | |
| 165 | + | git clone --depth=1 git@github.com:krolyxon/dwmblocks.git ~/.local/src/dwmblocks | |
| 166 | + | sudo make -C ~/.local/src/dwmblocks install | |
| 167 | + | ``` | |
| 168 | + | ||
| 169 | + | 25. st: Terminal | |
| 170 | + | ``` | |
| 171 | + | git clone --depth=1 git@github.com:krolyxon/st-luke.git ~/.local/src/st | |
| 172 | + | sudo make -C ~/.local/src/st-luke install | |
| 173 | + | ``` | |
| 174 | + | ||
| 175 | + | 26. dmenu: Program Menu | |
| 176 | + | ``` | |
| 177 | + | git clone --depth=1 git@github.com:krolyxon/dmenu.git ~/.local/src/dmenu | |
| 178 | + | sudo make -C ~/.local/src/dmenu install | |
| 179 | + | ``` | |
| 180 | + | ||
| 181 | + | 27. nsxiv: image viewer | |
| 182 | + | ``` | |
| 183 | + | git clone --depth=1 git@github.com:krolyxon/nsxiv.git ~/.local/src/nsxiv | |
| 184 | + | sudo make -C ~/.local/src/nsxiv install | |
| 185 | + | ``` | |
| 186 | + | ||
| 187 | + | 28. nvim: Text editor | |
| 188 | + | ``` | |
| 189 | + | git clone --depth=1 git@github.com:krolyxon/nvim.git ~/.config/nvim | |
| 190 | + | ``` | |
| 191 | + | ||
| 192 | + | 29. paru: AUR helper | |
| 193 | + | ``` | |
| 194 | + | git clone https://aur.archlinux.org/paru-bin.git && cd paru-bin && makepkg -sri && cd .. && rm -rf paru-bin | |
| 195 | + | paru -S --noconfirm htop-vim zsh-fast-syntax-highlighting-git keyd-git librewolf-bin | |
| 196 | + | ``` | |
| 197 | + | ||
| 198 | + | 30. set zsh as default shell | |
| 199 | + | ``` | |
| 200 | + | chsh -s $(which zsh) | |
| 201 | + | ``` | |
| 202 | + | ||
| 203 | + | 31. some symlinks and git alias | |
| 204 | + | ``` | |
| 205 | + | ln -s ~/.config/x11/xinitrc .xinitrc | |
| 206 | + | ln -s ~/.config/shell/profile .zprofile | |
| 207 | + | alias dots='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME' | |
| 208 | + | dots config --local status.showUntrackedFiles no | |
| 209 | + | ``` | |