A Brief Guide to Arch Linux Installation

Installing CLI

  1. Prepare your Arch installation .iso file.
    In my case, it was archlinux-2021.06.01-x86_64.iso.

  2. Check the partition status.
    # lsblk
    # fdisk -l

  3. Use your favorite partitioning tool to partition your disk.
    In my case, it was fdisk.
    # fdisk /dev/sd{x}

  4. Format the partitions.
    # mkfs.ext4 -j /dev/sd{x}{0}

  5. Mount the formatted partition to a point such as /mnt.
    # mount /dev/sd{x}{0} /mnt

  6. Edit the mirror server list file accordingly to your liking.
    # vim /etc/pacman.d/mirrorlist
    Note: use this website(https://archlinux.org/mirrorlist/) to generate a mirrorlist customized to your location.

  7. Run the pacstrap command.
    # pacstrap /mnt base base-devel linux linux-firmware networkmanager ntp vim
    In my case, I installed ntp and vim, as well as networkmanager.

  8. Append to /etc/fstab.
    # genfstab -p /mnt >> /mnt/etc/fstab

  9. arch-chroot to the new installation.
    # arch-chroot /mnt

  10. Set root password.
    # passwd

  11. Open /etc/locale.gen file.
    # vim /etc/locale.gen
    Uncomment the line that starts with en_US.UTF-8.
    And then,
    # locale-gen
    Set the locale
    # echo LANG=en_US.UTF-8 > /etc/locale.conf
    # export LANG=en_US.UTF-8

  12. Set the hostname of the machine
    # echo ${machine-name} > /etc/hostname

  13. Settings concerning the time
    # ntpd -q -g
    # hwclock --systohc --utc
    # ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime

  14. Add a user account and visudo it
    # useradd -m -g users -G wheel -s /bin/bash {$username}
    # passwd ${username}
    # visudo

  15. Install the boot loader GRUB and the Intel/AMD microcode package.
    # pacman -S grub-bios
    # grub-install --target=i386-pc --recheck /dev/sd{x}
    # grub-mkconfig -o /boot/grub/grub.cfg
    # pacman -S intel-ucode

  16. Enable NetworkManager
    # systemctl enable NetworkManager.service

  17. Finish the installation and reboot the system
    # exit
    # umount -lR /mnt
    # reboot

  18. You will see a non-graphical user interface login screen.

Installing GUI

$ ping -c 3 1.1.1.1
$ sudo pacman -Syu
$ sudo reboot
$ sudo pacman -Qi xorg
$ sudo pacman -S xorg xorg-server
$ sudo pacman -S mate mate-extra
$ sudo pacman -S lightdm
$ sudo pacman -S lightdm-gtk-greeter
$ sudo systemctl enable lightdm.service
$ sudo reboot
After the reboot, you will be able to see a GUI login screen.

Sources

  1. https://jeonwh.com/arch-install/ (in Korean)
  2. http://dsparch.sciomagelab.com/2017/03/11/%EC%95%84%EC%B9%98-%EB%A6%AC%EB%88%85%EC%8A%A4-%EC%84%A4%EC%B9%98%EA%B8%B0-2017-03-01-%EB%B2%84%EC%A0%84-kde-%ED%94%8C%EB%9D%BC%EC%8A%A4%EB%A7%88-%EC%84%A4%EC%B9%98-2-%EC%84%A4/ (in Korean)
  3. https://www.fosslinux.com/6832/how-to-install-mate-desktop-on-arch-linux.htm

Leave a Reply