Skip to content

Instantly share code, notes, and snippets.

@adham90
Last active June 18, 2022 14:29
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adham90/5d9fa00f35f830250f94909e99bd0af9 to your computer and use it in GitHub Desktop.
Save adham90/5d9fa00f35f830250f94909e99bd0af9 to your computer and use it in GitHub Desktop.
Archlinux installation guide

#Arch Linux installation guide

  1. See what disk structure there is: $ lsblk
  2. Format boot partition: $ mkfs.ext4 /dev/sda<root> or use btrfs 😮
$ mkfs.btrfs -L "Arch" /dev/sda1
$ mount /dev/sda1 /mnt
$ btrfs subvolume create /mnt/ROOT
$ umount /dev/sda1

Note that noatime will break some applications like the venerable mutt (unless you use Maildir mailboxes).

$ mount -o ssd,compress=lzo,noatime,subvol=ROOT /dev/sda1 /mnt
$ cd /mnt
$ btrfs subvolume create home
$ btrfs subvolume create root
$ btrfs subvolume create etc
$ btrfs subvolume create mnt
$ btrfs subvolume create opt
$ btrfs subvolume create var
$ btrfs subvolume create tmp
$ btrfs subvolume create boot
  1. Mount:
$ mount /dev/sda<root> /mnt
$ mkdir /mnt/home
$ mount /dev/sda<home> /mnt/home
  1. Change mirror for pacman: $ nano /etc/pacman.d/mirrorlist
  2. Install base and devel system: $ pacstrap -i /mnt base base-devel
  3. Generate fstab and check it:
$ genfstab -U -p /mnt >> /mnt/etc/fstab
$ nano /mnt/etc/fstab
  1. Chroot to mnt: arch-chroot /mnt /bin/bash
  2. Set up locale, for me uncomment en_US UTF-8 in locale.gen:
$ nano /etc/locale.gen
$ locale-gen
  1. Create locale.conf and export locale: $ echo LANG=en_US.UTF-8 > /etc/locale.conf $ export LANG=en_US.UTF-8
  2. Set Time Zone by linking to time zone info to localtime: $ ln -s /usr/share/zoneinfo/Egypt /etc/localtime
  3. Set Hardware Clock to UTC: $ hwclock --systohc --utc
  4. Set Hostname: $ echo adham-pc > /etc/hostname
  5. Configure Network: $ systemctl enable dhcpcd.service
  6. Set root password: $ passwd
  7. Create new user that will be sudo: $ useradd -m -g users -G wheel,video -s /bin/bash adham
  8. Install sudo with pacman: $ pacman -S sudo
  9. Uncomment wheel group from sudoers ”%wheel ALL=(ALL)”, so that user just created can be sudo: $ visudo
  10. Set password to created user: $ passwd adham
  11. Since we use MBR not GPT lets install GRUB BIOS bootloader: pacman -S grub-bios
  12. Install and configure GRUB to /dev/sda:
$ grub-install --recheck /dev/sda
$ grub-mkconfig -o /boot/grub/grub.cfg
  1. Exit chroot, unmount mounted partitions and reboot:
$ exit
$ umount -R /mnt/home
$ umount -R /mnt
$ reboot
  1. Install X server: $ pacman -S xorg-server xorg-server-utils xorg-xinit
  2. Install mesa for 3D support: $ pacman -S mesa
  3. Log or su as created user. Copy .xinitrc and add following content:
$ xinit
$ cp /etc/X11/xinit/xinitrc ~/.xinitrc
$ nano ~/.xinitrc
  1. Install xterm, xclock twm and awsome: $ pacman -S awsome vicious xorg-twm xorg-xclock xterm
  2. Intel graphics
$ pacman -S xf86-video-intel libva-intel-driver nvidia nvidia-utils
  1. Config awsome:
$ echo "exec awesome" >> ~/.xinitrc
$ mkdir -p ~/.config/awesome/
$ cp /etc/xdg/awesome/rc.lua ~/.config/awesome/ # basic config

or config i3 $ pacman -S i3 dmenu copy i3 folder in to your .config file copy i3status.conf in to your home dir and rename it to .i3status.conf use font awesome to get the status bar icons font-awesome cheatsheet https://fortawesome.github.io/Font-Awesome/cheatsheet/

  1. Install Laptop touchpad: $ pacman -S xf86-input-synaptics

  2. Update with pacman: $ pacman -Syu

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