123jk's Archlinux guide

BTW

So I've used this little thing called Archlinux for 3 years now (note I didn't "start" with it. I did try out ubuntu & manjaro before fully into that), and have been my main OS for almost 2 years

What is?

Arch isn't much different to any other linux distros on the surface.

Firstly, the packages on arch are much newer than the others (not as new as getting straight from source). That means newer features come faster on it than somethings like Ubuntu, but some bugs might appear bit more frequently.

Secondly, instead of releasing big updates within set points (aka point release), as soon as a package is updated upstream, the update will be available shortly after that (aka rolling release).

Finally, when installed using the official guide, it doesn't come with anything other than the essentials. You have to piece together everything all by yourself. You have to get really used to reading the wiki to do many things. This may make it harder for a beginner linux user who's still figuring out what does what. But for a more experienced user, the freedom it gives is certinely

These

The installing

This section is heavily based on arch's own install guide with some of my own experiences and other people's word thrown in there.

I'll assume you'll be having a computer with UEFI, basically all computers from around last 10 years should work.

1: Pre-Install

This is where we boot into the environment and perparing our system for installing.

a: getting media

Go to archlinux.org, head to the download page found on the top right corner. Scroll down until you see your country and click on one of the link below. Find the file named "archlinux-*.*.*-x86_64.iso" and download it to somewhere.

b: boot into machine

We want to make the iso booted on our machine. The way to do that today is to put it to a USB drive (aka a USB boot disk), so grab one of them, any USB big enough is ok. Make sure that it doesn't have any stuffs on it.

There are a lot of ways to make the USB media. You have rufus if you're doing it on windows. also works for . Ventoy, the one I use, allows you to put in multiple isos in a single usb and boot on all of these, and works

With all that done, plug it into the computer and reboot. We will boot into our install medium. This is done by pressing a key as soon the logo shows up, after which a menu appears, and you navigate to where to change the boot device, then choose your device and boot into that. This key varies between PC motherboard to laptops. Check what that key is and spam that sucker as fast as possible.

c: got internet? + various preinstall config

Now we are in a text environment,

d: disk partitioning + mounting

Now comes the interesting part. We're preparing the hard drives for the installation.

Before anything, check what drives you wanna install to by typing fdisk -l. Your disk can be found under their names, and it may contain things like /dev/sda(if you got an SSD), /dev/hdb(spinning disk), or /dev/nvme0n1(nvme drive), be sure to note them somewhere.

Type fdisk *drive*, using the names mentioned above for your hard drive.

Now let's think about how our disk layouts will be. With a UEFI system, you'll need these partitions:

There are other partitions you might want, such as:

Note what partitions you want and how big it should be.

At the fdisk screen, first type g to set up the partition table. To create a new partition, type n, then enter the partition number, starting & ending sector. For most of this you can use the default, and for the ending sector, you can use + followed by the size of the partition (500M, 1G etc). Create as many of them as you need.

To check the partition, enter p

To set the type of the partition, enter t. Then enter the partition number you want and then enter the type IDs for that.

Double check your table and when ready, type w and write all that to the disk.

With that done, we're going to format the partitions, with each a file system. For the EFI partition, it requires a FAT32 filesystem. For everything else (your root par, home par, etc), you can choose whatever you want.

2: Actual Install Step

a: mirroring

In this step we're gonna install all the packages we need. Having faster download speed helps a lot, and downloading from a place closer to you will just do that.

Using reflector, enter this:

reflector --country *country* --latest *N* --sort rate --save /etc/pacman.d/mirrorlist

Put your country name and how many mirrors in both sections.

b: first install of the packages

Do note that none of the apps and configs from the install media will carry to your environment. Also if you didn't install all the apps you wanted in this step you can do that later.

To install any packages right now, we use pacstrap -K /mnt *packages*, put the names of the packs you want in there. The base pkg is required, a linux kernel of any kind (plain linux, LTS, or zen) + the firmware (linux-firmware) are recommended, anything else is up for you to decide.

Obviously with only that you can't have a "real" system so here are some appls you might want:

Check your packages and press enter. Go do something else while it's installing. Maybe check on it once in a while, something unexpected might happen.

3: Initial System Config

If anything went right then most of the works here are done. Some other things may be needed for your system to work

fstab generation

In short, a fstab files defines where and how your drive partitions are mounted to, the system can

A fstab can be automatically created with this command: genfstab -U /mnt >> /mnt/etc/fstab. Check the file

Chrooting

The rest of this section we will be going into our recently installed system to make more configs in there. For easy access we chroot into it. Do so with arch-chroot /mnt

Timezones & Locales

To set your timezones enter ln -sf /usr/share/zoneinfo/*Area*/*Location* /etc/localtime. To find your location search in the mentioned folder before: ls /usr/share/zoneinfo. Then run hwclock --systohc.

For locale edit /etc/locale.gen, find your desired locale (ex: en_US.UTF-8 UTF-8, de.DE.UTF-8 UTF-8) and uncomment it (delete the #). Run locale-gen to generate the locales. Then set it by creating /etc/locale.conf(touch /etc/locale.conf) and enter

Set root password & Create a user

In your current system, you only have a root user to start with. It's a very powerful

Using root all the time is pretty dangerous, it's best to create a normal user for daily usage. Type useradd -m -G *group* *name*. If your user needs elevated privilages for administrations (eg systemctl, install & update with pacman), add the user to the wheel group by adding wheel after -G. Remember to set a password for your user: passwd *user*

The bootloader

We'll be using GRUB in this. Install needed packages with pacman -S grub efibootmgr (if )

Doing the works Arch

how to install packages

Arch uses pacman as it's package manager (not to be confused with a certain round yellow game character). To install most of your apps you will have to use it a lot. Here are

To install packages (need root): pacman -S *pkg*

the services

If you've been working with inits on the more popular distros (maybe except gentoo), it will probably be the same with arch as it uses systemd as the default init.

the desktop

Having a wall of text to work with

There are a ton of option to choose, you can go for a desktop environment which gives you all the thing you need, or you can get a window manager plus some programs to make one yourself.