WARNING: THIS GUIDE IS A WORK IN PROGRESS AND IS NOT YET A PROPER GUIDE


Introduction


Hello, this is an Arch Linux installation tutorial designed for new Linux users who want to jump head first into a DIY Linux distrobution. This guide assumes you already know what specs your PC, that you know what CPU architecture you have, and that you already have the live installation image flashed onto a USB flash drive. If you do not know about your PCs hardware specifications, or do not know how to flash the live installation image to a USB drive, please see the pre-steup guide(ADD LINK)

To start off, you will need to powerdown/shutdown your computer. When it is off plug in youe USB drive, and then power it back on. Most PCs should have their boot priority set to boot from the USB drive first. However, you may still need to go into your BIOS/UEFI and disable Secure Boot.

Once booted, check to make sure your internet connection is working by running: ping https://archlinux.org/

Partitioning the disk


WARNING: Make sure any and all data is backup from your drives before proceeding. Once you repartion and reformat the drives, they will be wiped entirely.

If you're system has multiple drives, I would reccommend disconnecting all of them except for the drive you want to use as a boot drive. This will make things easier. And this guide will continue assuming you only have one drive installed.

First off, list your drives with lsblk. If you're using an NVMe drive, it should be called nvme0n1. If you're on a SATA drive, it should say sda. If installing on a virtual machine, it should either be sda or vda

To start partitioning, run cfdisk /dev/YOUR_DRIVE. Next, create a new partition, and set the size to 300M. Then mark the partition as bootable. You can do this by pressing B with the partition selected. You can optionally make a swap partition. While not required, I would reccomend making one. Simply create a new partion. Ideally you should make it as big as a quater of your RAM. E.g. if you have 16GB of RAM, you should make the swap partition size 4G. However, you can make it bigger (Or smaller) if you feel the need. Next, create your root partition. Unless you need any additional partitions, simply allocate any remaining space to it.



Installation


This will install the base system. However, it will be lacking a lot of useful tools. We will install some extra software later--e.g. a text editor, browser, and DE (Desktop Enviornment). Run: pacstrap -K /mnt linux linux-firmware base base-devel While base-devel isn't necessary, it can be useful to have, so I reccomend installing it too.

Configuring the system



The fstab file is used to mount your disks upon boot. WARNING: It is important that you use the -U argument here. You want the drives to be recognised by UUID. This is because the name of the drive my change if a disk is added/removed, or dies. Going by UUID will prevent issues of the wrong drive being mounted to the wrong directoy.

To generate the fstab file, run genfstab -U /mnt >> /mnt/etc/fstab

Now, chroot into the new system with arch-chroot /mnt

At this point you will now need a text editor. Run pacman -S nano This guide will be using GNU nano, however, you may use whatever your preffered text editor is.

Now we need to generate locals for the system, to do this run nano /etc/locale.gen Next, find en_US.UTF-8 UTF-8 and uncomment it. You do this by removing the # at the start of the line. You should also uncomment any other locales you may need. E.g. ja_JP.EUC-JP EUC-JP and ja_JP.UTF-8 UTF-8 for Japanese. Next, run locale-gen to generate the locales. Then edit /etc/locale.conf with nano, and type LANG=en_US.UTF-8

Set a root password by running passwd

Installing the bootloader


For this tutorial, we're going to be using GRUB. Install GRUB by running pacman -S grub. And then run grub-install /dev/YOUR_DRIVE. Do NOT set the path to your boot partition! (E.g. /dev/YOUR_DRIVE1. Leave it as the path for the drive itself! Next, create GRUB's configuration file by running grub-mkconfig -o /boot/grub/grub.cfg. If no errors are returned, you're good to go!

Now it's time to make a user!


To create a new user, run useradd -mg wheel username. This will create a new user in the wheel group. You'll need to be in this group to be able to use sudo. Which will allow you to run commands at root level without having to be signed into the root user. Next, set a password for the new user by running passwd username.

Setting up sudo


Install sudo by running pacman -S sudo. Next, we'll need to edit the sudoers file, that way we'll be able to actually use it to run commands. Edit the sudoers file by running nano /etc/sudoers. You may notice a warning in the this text file telling you to only edit it with visudo. All we're going to be doing is uncommenting a line or two. So there's nothing to worry about. Scroll down until you see a line that says # %wheel ALL=(ALL:ALL) ALL, and then uncomment it (Remove the # and space after it). This will allow any users in the wheel group to use sudo. Optionally, you can add the line Defaults !tty_tickets to make it so you'll only have to enter your password once (Instead of every time you run sudo). This is, however, technically less secure. When you're done editing the file, press CTRL + O, and then hit enter to save the file. Then press CTRL + X to exit nano.

Setting the hostname


The hostname is the name of your system/PC. To set a host name, simple edit /etc/hostname and then set the desired hostname. Once again, you can edit the file with nano. nano /etc/hostname.

Booting into the new system


Congrats! You have succuessfully installed Arch Linux! Exit the chroot by running exit. Next, run umount -R /mnt, and then finally, reboot the system with reboot. You should boot back into the live installer screen. Select the option to boot an existing OS. If you've done everything correctly, you should be greated with a GRUB boot screen. Press enter to boot Arch Linux. Or wait for GRUB to automatically boot it for you. Once you've booted into Arch, it is safe to remove your USB drive. As of now, you have a fully working Arch installation! Next, just sign into the user you created earlier.

At this point in the guide however, I am going to encourage you to deviate from it. This guide will continue and show you how to install KDE Plasma, a Desktop Enviornment, as well as various other pieces of software. However, Arch is a DIY distro. And is designed to be whatever you want it to be. If you would like to quickly get a fully functional system with a DE, or already want to use KDE Plasma (And or the other various softwares), then you can continue following this guide. But, if you truly want to make Arch your own, unique system, then I urge you to continue on your own without adhering to this guide.

Installing KDE Plasma


KDE is a Desktop Enviornment (DE). A DE comes with a Window Manager (WM), and other useful tools/software. You can run a standalone WM, however a DE (Like KDE Plasma, in this instance) will be easier for a new user to get up and running, and will also be easier to use. Think of a DE as the graphical front end of the system---you'll need it for any graphical applications/tasks. To get a working KDE installation, run sudo pacman -S plasma plasma-meta sddm sddm-kcm pipewire wayland konsole. Now that you're signed into your user instead of the root user, you'll need to prefix pacman commands with sudo. For this guide I'll be using Wayland. You can use X11 with KDE Plasma, however there are some benefits to using Wayland. Such as added security. Once KDE has finished installing, reboot the system. After the system finishes booting, you should be greated by a graphical login screen. Sign into your user, and then you will have access to your new Plasma desktop.

Installing useful software


While you now have a working DE, you're still likely missing some useful software. Firstly, here's a quick rundown of how to use pacman: To install a package (Piece of software), use the -S argument, followed by the name of the package(s) that you want to install. To upgrade (Update) your system, run sudo pacman -Syu. This will upgrade all the packages on the system to their latest versions. To remove a package, use sudo pacman -Rs. This will remove the package, as well as any of it's dependencies that aren't dependencies of other packages. I.e. this removes the package and any components that it relies on, as long as nothing else needs those components.

First off, before installing any packages, you're going to need a terminal. Open Konsole--this is KDE's terminal emulator. This will function exactly like the command line you used during the installation of Arch.

Now, you're going to want to enable the multilib repository. You'll need to enable this if you want to download packages like Steam. First off, edit /etc/pacman.conf (sudo nano /etc/pacman.conf). Scroll down until you find a line that says #[multilib]. And underneath it will be a line that says Include = /etc/pacman.d/mirrorlist. Uncomment BOTH of these lines by removing the #'s, and then save the file.

For software you may want to install: Firefox, Libre Office, VLC, Dolphin, Steam, QEMU + Libvirt + Virtmanager (For Virtual machines), Tor Browser, qBittorrent and Thunderbird. You can install all of these by running: sudo pacman -S firefox libreoffice-still vlc dolphin steam qemu-full libvirt virt-manager torbrowser-launcher qbittorrent thunderbird. This should cover everything essential. Additionally, for gaming, you might want Lutris (sudo pacman -S lutris). And for creative work, you might might like Blender (Open source software for stuff like 3D animation and modeling, 2D animation, video editing, and much more), and Krita for photo/image editing (sudo pacman -S blender krita).