#arch #linux #archlinux
Please, keep in mind that everything after
#
is a comment and should not be executed. Also, lots of configurations has been moved to the dotfiles repository.
ip -c a # to get info about ip address [warning: lgbt]
iwctl. # if you have to connect over wifi
device list # to get to know name of wlan0
station wlan0 get-networks # to get the list of available routers
station wlan0 connect SSID # to connect to the given router
setfont ter-132n # make the font bigger and better
loadkeys us # set the US english keyboard map
pacman -Syy # refresh the database of package manager
If you love gambling: set country to Uzbekistan, else Russia (chances are 50/50 to fail in Uzbek mirror...)
reflector -c Uzbekistan --sort rate --save /etc/pacman.d/mirrorlist
# [Guide]
# Use gdisk for gpt, fdisk mbr. Avoid cfdisk & gfdisk at any cost!
# GUI & TUI while archlive is true evil!!!
# There is an instruction for single partition.
Drivers | /dev/sdX1 | /dev/sdX2 | /dev/sdX3 |
---|---|---|---|
Size limitations | 200/500 MB | 2 times RAM if less then 8GB or 8GB | rest of the disk |
Formatting | mkfs.vfat /dev/sdX1 | mkswap /dev/sdX2 | mkfs.ext4 /dev/sdX3 |
Mount Point | /mnt/boot/efi | [swapfile] | /mnt |
Before proceeding with work, check the name of your disk:
# It should be something like /dev/sda or /dev/sdb or if you have nvme disk /dev/nvme0n1
lsblk
and the output should be something like this:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 1 476.9G 0 disk
├─sda1 8:1 1 16G 0 part
│ └─md0 9:0 0 16G 0 raid1 [SWAP]
├─sda2 8:2 1 1G 0 part
│ └─md1 9:1 0 1022M 0 raid1 /boot
└─sda3 8:3 1 459.9G 0 part
└─md2 9:2 0 459.8G 0 raid1 /
# Let's say you have nvme disk, then the command should be something like this:
gdisk /dev/nvme0n1
# gdisk will create GPT disk label for you, if it's your first partition, you may consider erasing the disk:
o # erase the disk
# create a new partition
n # new partition
# For partition number and first sector, just press enter because default values are fine, but for the last sector, you have to write size of disk. Let's say we were creating a 512MB partition:
+512M # size of the partition
# Now, you have to choose the type of the partition. For EFI partition, you have to choose EFI System (ef00) type:
ef00 # type of the partition
# Now, create other partitions as well. Table for recommended partitions with it's instructions are given above.
# Write the changes to the disk:
w # write changes to the disk
# Take a look at the output of lsblk
# and find the name of the partition
mkfs.ext4 /dev/sdX1 # format the partition
Mounting disk is pretty easy task as all you have to know is the name of the partition and the mount point. For example, if you have a partition named /dev/sda1
and you want to mount it to /mnt
, then the command should be something like this:
mount /dev/sda1 /mnt
Table for recommended partitions with it's instructions are given above.
pacstrap /mnt base linux linux-firmware helix {intel-ucode | amd-ucode} git
genfstab -U /mnt >> /mnt/etc/fstab # generate fstab
arch-chroot /mnt # enter to the machine
ln -sf /usr/share/zoneinfo/Asia/Tashkent /etc/localtime # link the localtime
hwclock --systohc # synchronise clock to hardware
helix /etc/locale.gen # uncomment utf-8.us
locale-gen # generate the locale files
helix /etc/locale.conf # content: LANG=en_US.UTF-8
helix /etc/vconsole.conf # content: KEYMAP=us
echo "berserk" >> /etc/hostname # give a name to the machine
helix /etc/hosts. # start editing the localhost routes
Contents /etc/hosts
can be found here
pacman -S grub efibootmgr networkmanager network-manager-applet wpa_supplicant dialog mtools dosfstools reflector base-devel linux-headers bluez bluez-utils cups xdg-utils xdg-user-dirs rsync inetutils dnsutils nfs-utils gvfs gvfs-smb openssh
pacman -S zsh zsh-completions zsh-autosuggestions zsh-syntax-highlighting starship
pacman -S xf86-video-amdgpu # amd protcessors
pacman -S xf86-video-intel # intel protcessors
pacman -S nvidia nvidia-utils # nvidia grahps
pacman -S virtualbox-gues-utils # xf86-video-vmware # virtualbox
helix /etc/mkinitcpio.conf # add {nvidia | amdgpu | i915} to MODULES
mkinitcpio -p linux # compile for linux kernel
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=ICE # create the bootloader
helix /etc/default/grub # append video=1920x1080 to LINUX_DEFAULT # warn about the display
grub-mkconfig -o /boot/grub/grub.cfg # update the config
systemctl enable NetworkManager # turn on network management
systemctl enable bluetooth # turn on bluetooth service
systemctl enable cups # printer manager gets on
systemctl enable sshd # ssh server is getting on also
# If there's error, it's totally ok as you don't have XDISPLAY
# currently running in your session, once reboot, it gets fixed!
systemctl enable --now reflector.timer # make reflector refresh by the time
systemctl enable --now fstrim.timer # make the ssd get updated by the time
passwd # enter password for the root user
useradd -mG wheel -s /usr/bin/zsh yuri # create the user
passwd yuri # enter password for the user
EDITOR=helix visudo # open sudo privileges for wheel
exit
umount -a
exit
reboot
reflector -c [Russia|Uzbekistan] --sort rate --save /etc/pacman.d/mirrorlist
sudo pacman -S {xorg | wayland} {sddm | gdm} {kde: plasma kde-applications packagekit-qt5} {gnome: gnome gnome-tweaks}
sudo systemctl enable {gdm | sddm}
reflector -c [Russia|Uzbekistan] --sort rate --save /etc/pacman.d/mirrorlist
sudo pacman -S xorg lightdm lightdm-webkit2-greeter lightdm-webkit-theme-litarvan bspwm sxhkd picom nitrogen rofi alacritty
sudo systemctl enable lightdm
If not already done, edit /etc/lightdm/lightdm.conf
and set greeter-session=lightdm-webkit2-greeter
. Then edit /etc/lightdm/lightdm-webkit2-greeter.conf
and set theme or webkit-theme to litarvan. Configurations for bspwm and sxhkd are already included in my dotfiles. If you wanna manually configure it, then you can find the configuration files in the following links:
- https://github.com/orzklv/dots/tree/master/.config/bspwm
- https://github.com/orzklv/dots/blob/master/.config/sxhkd/sxhkdrc
- https://github.com/orzklv/dots/blob/master/.config/picom.conf
If you're going to install my dotfiles, then you don't need to install the AUR manager as it already included on installation process of dotfile.
sudo pacman -S rustup # Install rust to compile paru
rustup install stable # Get the latest stable version
git clone https://aur.archlinux.org/paru.git .paru
cd .paru && makepkg -si # Compile the dang paru
cd .. && rm -rf .paru # Remove the paru folder
All my configurations are hosted on GitHub repository and it's kinda very easy to install. Just run the following command:
curl -fsSL https://dots.orzklv.uz/install.sh | sh