Skip to content

Instantly share code, notes, and snippets.

@slashinfty
Last active March 31, 2024 17:33
Show Gist options
  • Save slashinfty/7eab03860878099f2637bb63a1cd1ff5 to your computer and use it in GitHub Desktop.
Save slashinfty/7eab03860878099f2637bb63a1cd1ff5 to your computer and use it in GitHub Desktop.

Verify boot mode if UEFI

ls /sys/firmware/efi/efivars

Check for network connectivity

ip link
ping archlinux.org

Update clock

timedatectl set-ntp true

Get device list and identify drive label (typically /dev/sdX or /dev/nvme0nX)

fdisk -l

Partition drive

fdisk /dev/XXX

Commands:

  • d deletes partitions
  • g creates a partition table
  • n creates a new partition
  • t changes the type of the partition
  • w saves the partitions

First partition should be +512M and type 1. Second partition should be +8G and type 19. Third partition should be remaining size.

Format partitions

mkfs.fat -F32 /dev/XXX1
mkswap /dev/XXX2
swapon /dev/XXX2
mkfs.ext4 /dev/XXX3

Mount partitions

mount /dev/XXX3 /mnt
mkdir /mnt/boot
mount /dev/XXX1 /mnt/boot

Install base Linux

pacstrap /mnt base base-devel linux linux-firmware vim nano

Generate fstab

genfstab -U /mnt >> /mnt/etc/fstab

Chroot into installation

arch-chroot /mnt

Set up locale

ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime
hwclock --systohc
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
locale-gen
echo "LANG=en_US.UTF-8" >> /etc/locale.conf

Set up hostname (choose what HOST is)

echo HOST >> /etc/hostname

Edit /etc/hosts with the following

127.0.0.1   localhost
::1         localhost
127.0.1.1   HOST.localdomain    HOST

Install bootloader

pacman -S efibootmgr intel-ucode linux-headers refind
refind-install

Get the UUID of /dev/XXX3

ls -l /dev/disk/by-uuid

Edit /boot/refind_linux.conf with the following

"Boot with standard options" "rw root=UUID=XXXXX rootfstype=ext4 initrd=\intel-ucode.img initrd=\initramfs-linux.img"
"Boot with minimal options" "ro root=UUID=XXXXX"

Create root password, then create sudo user (choose what USER is)

passwd
useradd -m USER
passwd USER
groupadd sudo
usermod -aG wheel USER && usermod -aG sudo USER

Edit visudo by uncommenting %wheel ALL=(ALL) ALL then exit vim with :wq

Edit /etc/pacman.conf by uncommenting the two lines for multilib

Install the display manager

pacman -Syu && pacman -S sddm-kcm
systemctl enable sddm.service

Install KDE Plasma and other key programs

pacman -S git go networkmanager openssh pacman-contrib plasma-meta polkit
systemctl enable NetworkManager.service

Install KDE-specific programs

pacman -S kclock kcolorchooser kdeconnect kdegraphics-thumbnailers kdf kdialog kfind kmix konsole ksystemlog ktorrent kweather 

Install other essential programs

pacman -S ark cups dolphin dolphin-plugins dragon elisa ffmpegthumbs firefox ghostwriter gspell gwenview hunspell-en_us mathjax mousepad nodejs npm okular pandoc partitionmanager qalculate-gtk spectacle svgpart unrar xdg-user-dirs zip
systemctl enable cups.service

Install bluetooth

pacman -S bluez bluez-utils
systemctl enable bluetooth.service

Set up user and install AUR helper

su - USER
git clone https://aur.archlinux.org/yay.git
cd yay && makepkg -si
cd .. && rm -rf yay
xdg-user-dirs-update
mkdir "${HOME}/.npm-packages"
npm config set prefix "${HOME}/.npm-packages"

Edit .bashrc with the following

NPM_PACKAGES="${HOME}/.npm-packages"

export PATH="$PATH:$NPM_PACKAGES/bin"

Press CTRL+D twice to return to installation medium, and use reboot to restart the system

After logging in, install remaining programs

sudo pacman -S f3d filezilla gimp gummi kicad kicad-library kicad-library-3d mixxx noto-fonts-cjk openscad prusa-slicer steam texlive-fontsrecommended texlive-latexextra
yay -S cndrvcups-lb-bin brother-hl2270dw discord-development diylc gifcurry kicad-interactivehtmlbom-git lycheeslicer notion-app-electron obs-studio-git pdfchain qpdfview rpi-imager vdhcoapp-bin vscodium-bin zoom

Set up git and GitHub

git config --global user.name "name"
git config --global user.email "email"
ssh-keygen -t ed25519 -C "email"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
cat ~/.ssh/id_ed25519.pub
@slashinfty
Copy link
Author

backiee-290969-landscape

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment