Skip to content

Instantly share code, notes, and snippets.

@notquitethereyet
Last active July 4, 2022 17:11
Show Gist options
  • Save notquitethereyet/a47e49283e1e62086eb9d055426e6b1b to your computer and use it in GitHub Desktop.
Save notquitethereyet/a47e49283e1e62086eb9d055426e6b1b to your computer and use it in GitHub Desktop.
A simple, laid back installation guide for Arch Linux (from scratch)
##ARCH SCRIPT##
### installing to wireless
iwctl
help
device list
#set device to scan mode
station wlan0 scan
station wlan0 get-networks
station wlan0 connect wifi-name
station wlan0 show
exit
ping archlinux.org
########setup begins
timedatectl set-ntp true
lsblk
cfdisk /dev/sdx # find the number x from lsblk
# if GPT, cfdisk won't let you set bootflag.
# if(GPT)
sudo pacman -S parted
parted /dev/sdx
print
(parted) set `number from previous command output` boot on
####################
###############################
#gpt if storage > 2TB, otherwise DOS
#make boot and root partitions and set boot flag in this menu
###############################
mkfs.ext4 /dev/sda1 #again this depends on your disks
mkfs.ext4 /dev/sda2
mount /dev/sda2 /mnt
mkdir /mnt/boot
mount /dev/sda1 /mnt/boot
#verify if mounted and set up properly
lsblk
pacstrap /mnt base base-devel linux linux-firmware vim nano
#generate fstab file based on UUID instead of label(the stuff linux boots when starting)
genfstab -U /mnt >> /mnt/etc/fstab
genfstab -U /mnt
#chroot into arch installation from the "bootable iso/usb device"
arch-chroot /mnt /bin/bash
#checking current working directory
pwd
ls
#set colour and parallel downloads on the new install
sed -i 's/#Parallel/Parallel/g' /mnt/etc/pacman.conf
sed -i 's/#Color/Color/g' /mnt/etc/pacman.conf
sed -i "/\[multilib\]/,/Include/"'s/^#//' /etc/pacman.conf
#installing packages with pacman
pacman -S networkmanager grub neofetch nano nodejs npm --noconfirm
sudo npm i -g npm $$ npm i -g n && n latest
#setting to start NetworkManager on boot
systemctl enable NetworkManager
#config grub
grub-install --target=x86_64-efi --bootloader-id=GRUB --efi-directory=/boot/
sed -i 's/#GRUB_DISABLE_OS_PROBER=false/GRUB_DISABLE_OS_PROBER=false/g' /mnt/etc/default/grub
grub-mkconfig -o /boot/grub/grub.cfg
#setting a password
passwd
nano /etc/locale.gen
# ctrl+w to search for "en_US" and alt+W to keep searching next
# comment out the language (en_US) in this case and ctrl+o to save and ctrl+x to exit
### Setting locale directly from terminal (American English and Japanese for me)
echo "LANG=en_US.UTF-8" > /etc/locale.conf
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen
echo "en_US ISO-8859-1" >> /etc/locale.gen
echo "ja_JP.UTF-8 UTF-8" >> /etc/locale.gen
echo "ja_JP.EUC-JP EUC-JP" >> /etc/locale.gen
locale-gen
echo "Hostname" > /etc/hostname
# to check: nano /etc/hostname
#setting timezone
ln -sd /usr/share/zoneinfo/America/New_York /etc/localtime ##### set your nearest city
#exitting out of chroot
exit
umount -R /mnt
reboot
#now login as 'root' and enter password
#making a user profile
useradd -mg wheel username
passwd username
nano /etc/sudoers
#search and delete the comment before "%wheel ALL=(ALL) ALL"
# or run the below command
sudo sed 's/%wheel/wheel/' /etc/sudoers
#add another line below all the wheel lines "Defaults !tty_tickets"
#or run this
sudo echo 'Defaults !tty_tickets' >> /etc/sudoers
# the above step makes sure you only need to provide sudo passwd once
# copying binbows fonts to linucks
sudo mkdir /usr/share/fonts/WinFonts
sudo cp Windows/Fonts/* /usr/share/fonts/WinFonts
sudo chmod 664 /usr/share/fonts/WinFonts/*
fc-cache -f
#Base linux installation is complete! (Further guide still WIP please proceed with caution)
#installing a GUI
pacman -S xorg plasma plasma-wayland-session kde-applications
sudo pacman -S noto-fonts-cjk noto-fonts-emoji noto-fonts ## for jp fonts
systemctl enable sddm.service
systemctl enable NetworkManager.service
reboot
#on reboot
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
yay --version
#in case dual booting
sudo -S os-prober
sudo os-prober
yay -S update-grub
sudo echo GRUB_DISABLE_OS_PROBER=false >> /etc/default/grub && sudo update-grub
sudo timedatectl set-local-rtc 1
yay -S nordvpn-bin
sudo systemctl enable --now nordvpnd
sudo gpasswd -a USERNAME nordvpn
### if on a laptop with 2 gpus
yay -S envycontrol nvidia-prime nvidia nvidia-utils nvidia-settings
# gaymer stuff
yay mangohud
yay goverlay
reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment