[Linux] SerjSX:
Minimal Arch Linux installation instructions​

NOTICE: I am not responsible if something happens with your device, proceed at your own risk. It is always recommended to follow Arch's own installation guide, even though these instructions below are from it already just more simplified.​

Welcome to my post about installing Arch Linux on UEFI 64bit systems. These instructions were first tested in VMs, and then I installed it on my main system. Both were successful. Please follow the instructions very correctly, and don't miss anything. If there is an error, don't panic, do these instead:

Check if you typed the command correctly, if you didn't, no need to panic further. Just type it again.

Search online about the error, it is possible that a solution is already there for you.

I just want to also add that, whatever happens with your device is not my responsibility. These instructions were done under UEFI 64bit systems, even in the VM there is a setting which lets you enable ‘Enable EFI (Special OSes only)’ (Oracle VM VirtualBox) and it acts as a UEFI system. I am not the one to be guiding you with other errors, so for that reason please post it in a separate place. These instructions were written by me and a friend of mine that helped with most of the things, I am a beginner as much as you are while following these instructions.

Before continuing, visit this link to install the ISO from a server, it's usually named like "archlinux-2021.03.01-x86_64.iso". Then prepare an installation medium by checking here. Once you have created a live USB for Arch Linux, shut down your PC. Plugin your USB and boot your system. While booting keep pressing F2, F10 or F12 key (depending upon your system) to go into boot settings, then choose "Boot Arch Linux (x86_64)", if that didn't work then check online to do it accordingly.

Notes before starting:

1. if you type commands and it says "you cannot perform this unless you are root" or similar, add "sudo" before the main command which then asks for your password and runs it as root.

2. In some areas characters are capitalized, if the CAPS LOCK isn't working do this combination: SHIFT+the key word. As in if I want to type the letter W capitalized, I hold SHIFT and then click W.

---

Table of Content:

I. Minimal Arch Linux Installation Instructions

A. Verifying boot mode

B. Connecting to the internet

C. Updating system clock

D. Creating the partitions

E. Formatting the partitions

F. Mounting the partitions

G. Installing the necessary system packages

H. Configuring the system

I. Applying localization

J. Setting up hostname

K. Setting up root password

L. Setting up bootloader

M. Exiting and restarting

N. Adding a non-root user

O. Setting a password for the account

P. Giving the user permissions

Q. Giving super user privileges to all the users in the wheel group

R. Installing KDE Plasma

II. Things worth looking at

III. Programs worth installing/looking at

---​

I. Minimal Arch Linux Installation Instructions​

A. Verifying boot mode​

First, run this command to know if your system is UEFI based:

ls /sys/firmware/efi/efivars

If the result is empty, then don't continue. If it does have files, then it is UEFI based and you may continue.

B. Connecting to the internet​

Connect to internet by following this for wireless and this for others, usually there's no need if you're doing this in a VM. The instructions on the wiki are straight forward, I don't have to write it here.

C. Updating system clock​

In order to update system clock, let's start it:

timedatectl set-ntp true

Now let's list the timezones available to see if yours is here:

timedatectl list-timezones

Then let's set your timezone:

timedatectl set-timezone Zone/SubZone

instead of "Zone/SubZone" insert one from the command that we did before, for example:

timedatectl set-timezone Canada/Eastern

Now let's check if it worked:

timedatectl status

If it doesn't say the timezone you set, then do the instructions again.

D. Creating the partitions​

First type this (if you want to use fdisk, check here):

cfdisk

Delete all of your current partitions until it's 1 partition that has your full storage (by choosing each partition and then do "Delete" that's at the bottom), then create 2 partitions (by choosing "New" that's at the bottom when on an empty non-labeled partition storage without any type):

- The first with size 260MiB and with the type: EFI system partition. If you already have a partition for EFI system similar to this one then there's no need to do this again.

Now go back to the second one which has the rest of your storage (not the EFI system, the one that has no type), and create ("New" at the bottom) another one:

- With size rest (as in just click enter so all of the rest storage will be set to it) and with the type: Linux x86-64 root

After creating the 2 partitions with their correct sizes and the type, write the 2 partitions by first choosing the first one then there's "Write" at the bottom of the cfdisk place, just like you did with type and creating the partitions, choose the first partition then click "Write" and then type "yes", do this for the second partition as well. And then when you write both of the partitions, do "Quit" and run this:

wipefs -a device

Here ^ instead of "device" write the partition name of the second one that we created up, which has Linux x86-64 root. For example it can look like this: /dev/sda2, so you replace that with device, for example:

wipefs -a /dev/sda2

E. Formatting the partitions​

Now let’s format the partitions we created (do cfdisk back to check if sda1 is EFI and if sda2 is the root partition! If it isn't rewrite it accordingly):

For the EFI system partition:

mkfs.fat -F32 /dev/sda1

For the root partition:

mkfs.ext4 /dev/sda2

F. Mounting the partitions​

Now let’s mount the partitions (do cfdisk back to check if sda1 is EFI and if sda2 is the root partition! If it isn't rewrite it accordingly):

For the EFI system partition:

mkdir /mnt/efi

mount /dev/sda1 /mnt/efi

For the root partition:

mount /dev/sda2 /mnt

G. Installing the necessary packages​

These packages are for the basic functionality of Arch Linux, we still didn’t go to the KDE installation. Please take these into consideration before continuing:

1. "intel-ucode" may be replaced, I use intel processor that's why I have written that package. Check here to install according to your processor, and replace “intel-ucode” with your processor’s package.

2. "linux" can be replaced with another kernel of your choice, this is the most stable for daily usage according to Arch Linux, check here to choose the kernel of your choice, and replace the package.

3. "efibootmgr" is needed by "grub" for EFI systems, it’s necessary to have it.

4. "nano" used for text editing which we will use later on, and "networkmanager" used for connecting to wifi with typing "nmtui", but we have to enable it first then restart the pc, as we move on we will enable it.

After choosing the packages that you will replace, if you will any, type this and replace the packages accordingly (if you have to replace some, feel free to add more but make sure you know how to use the package!):

pacstrap /mnt base base-devel linux linux-firmware nano intel-ucode grub efibootmgr networkmanager

H. Configuring the system​

Since we installed the necessary packages, now we will configure the system. Run these commands separately:

genfstab -U /mnt >> /mnt/etc/fstab

arch-chroot /mnt

Note for the next command: change “Zone/SubZone” according to what you put in C

ln -sf /usr/share/zoneinfo/Zone/SubZone /etc/localtime

hwclock --systohc

I. Applying localization​

Now we will apply localization, follow these commands:

nano /etc/locale.gen

After running the command above, uncomment "en_US.UTF-8 UTF-8" OR the language of your choice.

Save the file and then run:

locale-gen

Now let’s create the configuration file:

nano /etc/locale.conf

Type this in the file: LANG=en_US.UTF-8

OR replace "en_US.UTF-8" with the language you uncommented before. Save it with CTRL+S and then quit (it should be written below the shortcuts for the operations, make sure to read them)

J. Setting up hostname​

Now we will setup the hostname file, type this:

nano /etc/hostname

Then type a host name of your choice in the file and save it with CTRL+S and then quit.

Now we need to setup another file before moving on, run this command:

nano /etc/hosts

And type these in the file (respect the new lines! If a line is in a separate line, don't type it next to each other):

127.0.0.1 localhost

: :1 localhost

127.0.1.1 myhostname.localdomain myhostname

Replace "myhostname" with the hostname you put in the /etc/hostname file. Then save the file and quit.

K. Setting up root password​

Now let’s setup the root password, type:

passwd

And insert the password (it should prmopt up).

L. Setting up the bootloader​

Now let’s setup the bootloader (GRUB), run these separately:

grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=GRUB

grub-mkconfig -o /boot/grub/grub.cfg

M. Exiting and restarting​

Exit chroot by typing "exit" and now restart by typing "reboot", the second it reboots remove the USB.

If you're in a VM type "shutdown now" and go remove the Arch Linux image from the VM settings (this is according to Oracle’s VM software) by going to the settings of your VM, then storage, then the one under "Controller: IDE", under the other tab in "Attributes" next to Optical Drive there's a CD icon, click on that and change from the ISO to your Host Drive.

​

After rebooting login by typing the username as "root" and the password the one you wrote before.

N. Adding a non-root user​

Now let’s add a non-root user, it’s not safe to use root as a daily usage account. Run this command and replace “user” with a username of your choice:

useradd -m user

O. Setting a password for the account​

Now let’s set a password for that account, run this command and replace “user” with the username you put in N (from the previous step):

passwd user

P. Giving the user permissions​

Now let’s add the user to the required groups, as in giving permissions. Run this command and replace “user” (the last word) with the username you created above (in step N):

usermod -aG wheel,audio,video,optical,storage user

For example if I created an account named “serjsx” then I run this command:

usermod -aG wheel,audio,video,optical,storage serjsx

Note: don’t be surprised if it doesn’t output anything, just move on. If something is wrong it’ll already tell you the error.

Q. Giving super user privileges to all the users in the wheel group​

Now we will give the necessary privilege to the users that we create (either now or in the future, currently it’s the one we did in step N and O), run this command:

EDITOR=nano visudo

Uncomment (remove the #) the line that says:

# %wheel ALL=(ALL) ALL

Remove the # that’s at the beginning of the sentence, and now exit root account by typing “exit” and then login to your user (write the username of the account you created and then the password).

R. Installing KDE Plasma​

Now let’s install KDE! KDE is one of the most popular desktop environments for Arch Linux, that's why I went with it. However, you can install any desktop environment you want after this step. Because, even without installing a desktop environment, you successfully installed Arch Linux on your system. You can check here to know about other desktop environments available for Arch Linux: https://wiki.archlinux.org/title/desktop_environment

You can check here to see my lightweight custom environment setup instructions: https://xdaforums.com/t/arch-linux-lightweight-custom-environment-setup.4385985/

First, let’s enable Network Manager (nmtui) by running this command:

sudo systemctl enable NetworkManager

If it asks for your password just type it and click enter. Then type “reboot”, login, run “nmtui” and connect to your wifi.

Next, update your system by typing this command:

sudo pacman -Syu

Now let’s install the necessary packages, type these:

sudo pacman -S xorg-server plasma sddm gwenview konsole kate dolphin okular spectacle partitionmanager ark packagekit-qt5 appstream noto-fonts-emoji noto-fonts gvfs-mtp android-file-transfer android-udev

Note: there are several applications here ^ that I chose, which are: dolphin (file manager), kate (text editor), konsole (terminal), gnenview (picture viewer), okular (document viewer), spectacle (screenshot taker), paritionmanager (to manage your partitions), ark (archive extractor and other related), packagekit-qt5, noto-fonts noto-fonts-emoji (popular fonts), gvfs-mtp android-file-transfer android-udev (Android-related runtimes and software, giving you a better experience when trying to move files from your phone to your desktop) and appstream needed for Discover to install applications. You can add/remove any of these, these are just applications nothing related to the system, but make sure you install konsole or a terminal! Also you can just install kde-applications instead of the softwares I have added, kde-applications has ALL of the KDE applications (can include a lot of bloatware, but don't exclude packagekit-qt5, appstream, sddm, plasma and xorg-server!).

After the packages are installed, now let’s enable SDDM by typing:

sudo systemctl enable sddm.service

Just in case you want to check if the session is working, run this:

loginctl show-session $XDG_SESSION_ID

Type “reboot” to reboot, and after rebooting you should see SDDM login page! Type the password of your account and you should go in KDE.

This step is optional, but it is recommended because it will let you install packages from the AUR (user repisotary). We will also install yay by running these separately:

(Let’s install git in order to install yay afterwards with it)

sudo pacman -S git

git clone https://aur.archlinux.org/yay.git

cd yay

makepkg -si

And now, one last thing to do before you enjoy your system. Sometimes Discover won’t work, you may face an issue, so it is recommended to reinstall appstream. Run this command:

sudo pacman -S appstream

If it says no application found, do it with yay:

yay -S appstream

​

That’s it! You should now have a full working OS, running Arch Linux. This is a very important thing to do nowadays, because Microsoft is installing more and more tracking solutions within their operating systems, and you may eventually ask yourself: "Do I really have control over what happens on this operating system?"

The answer is, "No". Linux distributions give you the control and freedom that you deserve, so what you did today is a great accomplishment and a good start. I hope you can learn more about the usage of this distribution by checking their wiki from this link: https://wiki.archlinux.org/

II. Things Worth Looking At​

If you need help, go here: https://wiki.archlinux.org/title/Arch_IRC_channels​

If you need help, go here: https://bbs.archlinux.org/​

KDE: https://kde.org/​

Arch Linux's installation guide: https://wiki.archlinux.org/title/Installation_guide​

Arch Linux applications list: https://wiki.archlinux.org/title/List_of_applications​

Best practices for hardening Arch Linux: https://wiki.archlinux.org/title/Security​

Swap: https://wiki.archlinux.org/title/Swap​

Pacman: https://wiki.archlinux.org/title/pacman​

AUR: https://aur.archlinux.org/ ​

Arch Linux - Desktop Environments: https://wiki.archlinux.org/title/desktop_environment​

III. Programs Worth Installing/Looking At​

Firefox/LibreWolf: if you choose Firefox, make sure to use https://ffprofile.com/ for adjusting the settings, the default settings aren't good enough. If you use LibreWolf, they're already there.

Firefox: sudo pacman -S firefox

Librewolf: yay -S librewolf-bin

GNOME Disk Utility: this is, in most cases, better than KDE's partition manager.

sudo pacman -S gnome-disk-utility

LibreOffice: FOSS office productivity tool, this is the best one you can get for Linux distributions.

If you want stable release:

sudo pacman -S libreoffice-still

If you want the latest features:

sudo pacman -S libreoffice-fresh

Xarchiver: even though Ark is installed already, Xarchiver has a smoother experience in most cases. However, you can still use Ark, eventually they result the same thing.

sudo pacman -S xarchiver

GIMP: this is the best image editor for Linux distributions, it is recommended to have it installed just in case you need it one day. Also did I forget to mention that it's free?

sudo pacman -S gimp

Check out the tutorials as well: https://www.gimp.org/tutorials/

Kdenlive: this is the best video editor for Linux distributions, and it's free!

sudo pacman -S kdenlive

zip, unzip: these three command line tools are used for extracting and compressing to zip format.

sudo pacman -S zip unzip

Read these to know how to use them:

zip: https://man.archlinux.org/man/zip.1

unzip: https://man.archlinux.org/man/unzip.1

:cowboy: Have a good day! Let me know if it worked with you :D