Skip to content

Instantly share code, notes, and snippets.

@VivaCaligula
Last active February 1, 2022 16:40
Show Gist options
  • Save VivaCaligula/65a0e3489ec110ed08d31027b1065d4d to your computer and use it in GitHub Desktop.
Save VivaCaligula/65a0e3489ec110ed08d31027b1065d4d to your computer and use it in GitHub Desktop.
A quick install guide for Arch.

First time Arch installation and setup.

This should only take 10-20 minutes.

This entire process can be circumvented by installing a graphical variant of Arch like Manjaro or Antergos.


PRE-INSTALL

DL ISO, Burn/Mount, option "Boot Arch Linux (x86_64)": https://www.archlinux.org/download/ 
`ping -c 3 www.snerx.com`                | Or `wifi-menu`
`fdisk -l`
`cfdisk /dev/sda`
    -> DOS                                    | If it asks which format.
Delete all partitions (assumedly), sda1 for root, sda2 for swap.
    -> New > total space minus swap (x-1G) > primary > Bootable
    -> New > 1G (half of RAM) > primary > Type > Linux Swap
    -> Write > "yes" > Quit
`mkfs.ext4 /dev/sda1`                    | Formats root partition.
`mount /dev/sda1 /mnt`
`mkswap /dev/sda2`
`swapon /dev/sda2`

INSTALL

`pacstrap /mnt base base-devel`          | This takes a while.
If that fails because of old install ISO, $ pacman-key --refresh-keys
`arch-chroot /mnt`
`passwd`                                 | Enter what you want your root pass to be.
`nano /etc/locale.gen`                   | Uncomment both en_US, then Ctrl+O and Ctrl+X
`locale-gen`
`cd /usr/share/zoneinfo/US`
`ln -s /usr/share/zoneinfo/US/Pacific /etc/localtime`
`hwclock --systohc --utc`                | Generates /etc/adjtime
`echo INSERT_BOX_NAME_HERE > /etc/hostname`
Next two are for network stuff.
`sudo pacman -S wireless_tools wpa_supplicant wpa_actiond dialog`
`systemctl enable [email protected]`   | Only if you need dynamic IP.
Enable a bios replacement and mount.
`sudo pacman -S grub-bios`
`grub-install /dev/sda`
`mkinitcpio -p linux`                    | initramfs (for grub?)
`grub-mkconfig -o /boot/grub/grub.cfg`   | Generates a grub config.
`exit`                                   | Brings you back to ISO.
`genfstab /mnt >> /mnt/etc/fstab`
`umount /mnt`
`reboot`

POST-INSTALL

`wifi-menu`                              | Select your network.
`ping -c 3 https://snerx.com`                | To make sure it's connected.
`nano /etc/pacman.conf`                  | This will allow both 32 and 64-bit programs.
    -> uncomment [multilib] and Include = /etc/pacman.d/mirrorlist
    -> Ctrl+O and Ctrl+X                 | To save and close.
`sudo pacman -Sy`                             | Refreshes repository list.
Create a new user with group permissions:
    `useradd -m -g users -G wheel,storage,power,network -s /bin/bash NEW.USER.NAME`
    `passwd NEW.USER.NAME`
`sudo pacman -S sudo`                         | Make sure it's up to date.
`nano /etc/sudoers`
    -> Uncomment `%wheel ALL=(ALL) ALL`
`sudo pacman -S alsa-utils`                   | Sound drivers
`alsamixer`
    -> Use M to unmute Master and other channels; set dB to 0; ESC when done.
`speaker-test -c 2`                      | Tests sound now, Ctrl+C to stop.
`sudo pacman -S xorg-server xorg-iceauth xorg-sessreg xorg-xbacklight xorg-xcmsdb xorg-xgamma xorg-xhost xorg-xinit xorg-xinput xorg-xmodmap xorg-xrandr xorg-xrdb xorg-xrefresh xorg-xset xorg-xsetroot xorgproto mesa`
`lspci -v | less`                        | Shows you what graphics card you have "VGA compatible controller"; Ctrl+Z
If you were to install nvidia 64bit driver:
    `sudo pacman -S nvidia nvidia-utils`      | lib32-nvidia-utils for 32-bit.
If you need to uninstall wrong drivers:
    `sudo pacman -Rns package_name`
`sudo pacman -S xf86-input-synaptics`         | Drivers for laptop trackpad.
`sudo pacman -S xorg-twm xorg-xclock xterm`   | Install default graphical environment.
`startx`                                 | Test graphical environment.
`pkill x`                                | To end xwindow.
To enable AUR:
`nano /etc/pacman.conf`
    -> add lines 
    `[archlinuxfr]`
    `SigLevel = Never`
    `Server = http://repo.archlinux.fr/$arch`
    Update the pacman database: `sudo pacman -Syu`
    Install yay: `sudo pacman -S yay`
    Supports colored output when you enable Color option in the /etc/pacman.conf file.
    Update the yay database: `yay -Syu`

You're done! Additionally, to rice your Archbox: curl https://raw.githubusercontent.com/VivaCaligula/SCRIPTS/master/installer.sh | bash

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