Skip to content

Instantly share code, notes, and snippets.

@avdotion
Last active August 29, 2018 08:32
Show Gist options
  • Save avdotion/c83ac751484b76896678065fd605f5a3 to your computer and use it in GitHub Desktop.
Save avdotion/c83ac751484b76896678065fd605f5a3 to your computer and use it in GitHub Desktop.
Arch installation commands

Arch Installation Yokel Guide

Pay attention to zsh and swapfile

Setup the network

sudo wifi-menu

Update the Pacman database

pacman -Syyy

Setup the disk space

fdisk -l
fdisk /dev/sdXY

Format disk space to Fat32, ext4

mkfs.fat -F32 /dev/sdXY
mkfs.ext4 /dev/sdXY`

Mount the disk partitions

mount /dev/sdXY /mnt
mkdir /mnt/home
mount /dev/sdXY /mnt/home

Load necessary packages (you can use bash instead of zsh)

pacstrap -i /mnt base base-devel zsh vim git efibootmgr dialog wpa_supplicant sudo

Generate fstab

genfstab -pU /mnt >> /mnt/etc/fstab

Move computer on

arch-chroot /mnt /bin/bash

Install necessary packages

pacman -S grub dosfstools os-prober

Localization stuff

nano /etc/locale.gen
locale-gen

List of available timezones

timedatectl list-timezones

Set the timezone (Europe/Moscow, for example)

timedatectl set-timezone Zone/SubZone

Grub setting up

mkdir /boot/EFI
mount /dev/sdb5 /boot/EFI
grub-install --target=x86_64-efi --bootloader-id=grub_uefi --recheck
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo
grub-mkconfig -o /boot/grub/grub.cfg

Prefer swapfile to /swap

fallocate -l 2G /swapfile
chmod 600 /swapfile
mkswap /swapfile
echo '/swapfile none swap sw 0 0' | tee -a /etc/fstab

Set the hostname

echo MYHOSTNAME > /etc/hostname

Set the root password

passwd

Add user

useradd -m -g users -G wheel -s /bin/zsh MYUSERNAME

Set the password to the just created user

passwd MYUSERNAME

Make MYUSERNAME able to do smth (uncomment this line: %wheel ALL=(ALL) ALL)

nano /etc/sudoers

Bye

exit
umount -a
reboot

Resources:

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