aboutsummaryrefslogtreecommitdiff
path: root/arch_install.md
blob: 8356b6e3af934175f24d2322905121e0df8d57c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# Arch Install

## Connect to Internet
If you are using wifi, use [iwd](https://wiki.archlinux.org/title/Iwd)
```
device list
station *device* get-networks
station *d
```

## Install Guide

1. Turn on parallel downloads
``sed -i "s/^#ParallelDownloads = 5$/ParallelDownloads = 15/" /etc/pacman.conf``

2. Install archlinux keyring
``pacman --noconfirm -Sy archlinux-keyring``

3. Load layout, set time
```
loadkeys us
timedatectl set-ntp true
```

4. Create ext4, efi, swap partition
```
lsblk
cfdisk /dev/sdx or /dev/nvme0x

# Efi partition
mkfs.fat -F32 $efipartition

# Swap partition
mkswap $swappartition
swapon $swappartition

# ext4 partition
mkfs.ext4 $partition
```

5. Mount linux partition to /mnt
``mount $partition /mnt``

6. Pacstrap
```
pacstrap /mnt base base-devel linux linux-firmware
```

7. genstab
```
genfstab -U /mnt >> /mnt/etc/fstab
```

8. chroot
```
arch-chroot /mnt
```

9. set timezone
```
ln -sf /usr/share/zoneinfo/Asia/Kolkata /etc/localtime
```

10. set hardware clock from system clock
```
hwclock --systohc
```

11. set locale
```
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
locale-gen
echo "LANG=en_US.UTF-8" > /etc/locale.conf
echo "KEYMAP=us" > /etc/vconsole.conf
```

12. set hostname
```
echo $hostname > /etc/hostname
echo "127.0.0.1       localhost" >> /etc/hosts
echo "::1             localhost" >> /etc/hosts
echo "127.0.1.1       $hostname.localdomain $hostname" >> /etc/hosts
```

13. Initramfs
```
mkinitcpio -P
```

14. Set root password
```
passwd
```

15. install grub
```
pacman --noconfirm -S grub efibootmgr os-prober
mkdir /boot/efi
mount $efipartition /boot/efi

grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=archlinux --recheck

sed -i 's/quiet/pci=noaer/g' /etc/default/grub
sed -i 's/GRUB_TIMEOUT=5/GRUB_TIMEOUT=0/g' /etc/default/grub

grub-mkconfig -o /boot/grub/grub.cfg
```

16. Install all the required user packages
```
pacman -S --noconfirm hyprland waybar hyprlock hyprpaper hyprpolkitagent hyprshot gammastep swaync \
    noto-fonts noto-fonts-emoji noto-fonts-cjk ttf-jetbrains-mono-nerd ttf-font-awesome \
    awesome-terminal-fonts bat libnotify ntfs-3g \
    jq mpv ncdu transmission-cli yt-dlp cowsay \
    pacman-contrib pavucontrol rsync ripgrep python-pywal \
    imlib2 zip unzip wget pcmanfm gvfs xarchiver lf chafa stow fuzzel\
    fzf man-db pipewire pipewire-pulse pamixer kanshi \
    imagemagick networkmanager git dash papirus-icon-theme \
    neovim lua xdg-user-dirs mpd ncmpcpp eza \
    zsh zsh-autosuggestions zathura zathura-pdf-mupdf

```

17. Enable networkmanager
```
# network manager
systemctl enable NetworkManager.service
```

18. set shell
```
rm /bin/sh
ln -s dash /bin/sh
```

19. Set user permissions
```
echo "%wheel ALL=(ALL:ALL) ALL" >> /etc/sudoers
```

20. Create user
```
useradd -m -G wheel -s /bin/zsh $username
passwd $username
```

21. Setup dotfiles
```
cd $HOME
git clone git@github.com:krolyxon/dotfiles.git  ~/.dotfiles/
cd ~/.dotfiles; stow .
```

22. nsxiv: image viewer
```
git clone --depth=1 git@github.com:krolyxon/nsxiv.git ~/.local/src/nsxiv
sudo make -C ~/.local/src/nsxiv install
```

23. nvim: Text editor
```
git clone --depth=1 git@github.com:krolyxon/nvim.git ~/.config/nvim
```

24. paru: AUR helper
```
git clone https://aur.archlinux.org/paru-bin.git && cd paru-bin && makepkg -sri && cd .. && rm -rf paru-bin
paru -S --noconfirm htop-vim zsh-fast-syntax-highlighting-git keyd-git zen-browser-bin
```

25. set zsh as default shell
```
chsh -s $(which zsh)
```