• Hey! Register here to create your account, engage with the community, and talk about what is new!

How to install Arch Linux

strawspideralt9673

New member
Joined
Dec 18, 2024
Messages
17
Reaction score
0
hi this is going to be about on how to instal arch linux
also only for UEFI

1. get an ISO from archlinux.org/download and create usb with https://rufus.ie/en/
2. reboot your pc after doing that with the USB plugged in, you may see multiple options, select the one saying "Arch Linux install medium (x86_64, UEFI)

Set the console keyboard layout and font​

the default is US, you can list available ones with
Code:
localectl list-keymaps
to set the keyboard layout, pass it's name to loadkeys. for example, to set a German layout
Code:
loadkeys de-latin1

Console fonts are located in /usr/share/kbd/consolefonts/ and can likewise be set with setfont omitting the path and file extension. For example, to use one of the largest fonts suitable for HiDPI screens, run:
Code:
setfont ter-132db

Connect to the internet​

type in,
Code:
iwctl
in the terminal.
first, if you don't know your wireless device name, list all WiFi devices with
Code:
device list
then, to initiate a scan for networks (note that this command will not output anything):
Code:
station name scan
You can then list all available networks:
Code:
 station name get-networks
Finally, to connect to the network.
Code:
station name connect SSID
then finally, exit iwctl using:
Code:
exit

for ethernet, just plug in the cable

Partition the disks​

type in lsblk in the terminal to list all disks you have, look at the name of the disk you want to install and note it down, if you don't know which one look at the size of the disk you want to install on.
type in the terminal:
Code:
cfdisk /dev/nameofdisk
if it asks for a label type, select "GPT"
you'll see multiple partitions, use your up and down arrow keys to select the partitions and left and right to select the options below

you want to delete everything, use the left and right arrow keys to select [DELETE] and press enter then with the down arrow key select the next partition and delete it too, delete the last partition too with the down arrow key you go to it and delete it, after that you'll have one line saying "Free Space", then with the left and right keys again, select "New", delete whatever is written and type in "1G" for 1 gigabyte, then with the down arrow key select the "Free Space" again, then again with the left and right keys select "New" once again and again remove whatever is written and type in "4G" for 4 gigabytes, finally go to "Free Space" again and press "New" again, this time press enter instead of changing the size, you have to do this in this exact order
finally, with the left and right arrow keys go to the option saying "Write", and select it, after doing that there will be a box below, in it type 'yes', then go to "Quit" and press enter.

Format the partitions​

type in the terminal:
Code:
lsblk
you'll see 3 partitions at the disk you partitioned, look at the third partition and note it's name down, then type in:
Code:
mkfs.ext4 /dev/name of the third partition of the disk you partitioned
, it'll look like
Code:
mkfs.ext4 /dev/name3
, you type the name of the disk instead of name, keep the 3, after doing that command, press enter

now we'll format the first partition, you can do that with:
Code:
mkfs.fat  -F 32 /dev/nameofdisk1

finally, we do the second partition with:
Code:
mkswap /dev/nameofdisk2

[HEADING=2]Mount the file systems[/HEADING]
type in the terminal to mount the third partition:
[CODE]mount /dev/nameofdisk3 /mnt

to mount the first partition we need to make the directory "/mnt/boot/efi" to do that type in:
Code:
mkdir -p /mnt/boot/efi
then to mount it,
Code:
mount /dev/nameofdisk1 /mnt/boot/efi

finally, the second partition
Code:
swapon /dev/nameofdisk2
after that, type lsblk it should look something like this:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
name /mnt/boot/efi
|-name1
|-name2 [SWAP]
|-name3 /mnt

Install essential packages​

type in the terminal:
Code:
pacstrap /mnt base linux linux-firmware sof-firmware nano os-prober base-devel grub efibootmgr networkmanager intel-ucode amd-ucode
and press enter

skip the listed packages if:
os-prober: if you don't want to dual boot
intel-ucode: if you don't have an intel CPU
amd-ucode: same as intel-ucode, if you don't have an AMD CPU skip this one
sof-firmware: for newer sound cards, skip this if you don't have one

Fstab​

after you installed all those packages, type in:
Code:
genfstab /mnt
you'll get an output make sure it says
ext4 for the third partition
/boot/efi and vfat for the first partition
none and swap for the second partition

then type in:
Code:
genfstab > /mnt/etc/fstab

Chroot​

change root into the new system:
Code:
arch-chroot /mnt

Time:
set the time with:
Code:
 ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
then:
Code:
hwclock --systohc

Localization:
type in the terminal:
Code:
nano /etc/locale.gen
scroll down with the down arrow key and find your locale, if you're using en_US then select the one saying UTF-8, but if you're not just find your locale, press right arrow key and press backspace when you find it to uncomment the locale (uncommenting is removing the # at the start of it), then press ctrl + o to save the file and press enter, then press ctrl + x to exit

then in the terminal type:
Code:
locale-gen

Setting the root password:
this is simple, just type in:
Code:
passwd
you'll see something saying "New Password" type your password in, it doesn't show you what you're typing, but when you're completed typing press enter, then retype the password and press enter.

Adding a User:
okay, type in the terminal:
Code:
useradd -m -G wheel -s /bin/bash name
and set a password with:
Code:
passwd name
like how you did with root, set the password

Setting up Sudo:
type in the terminal:
Code:
EDITOR=nano visudo
scroll down and uncomment "%wheel ALL=(ALL) ALL" then do ctrl + o and then ctrl + x

Enabling daemons
type in the terminal:
Code:
systemctl enable NetworkManager

Grub Setup:
type in the terminal:
Code:
grub-install /dev/nameofdisk
this time, we don't choose a partition and we install it on the disk
after you type that command type:
Code:
grub-mkconfig -o  /boot/grub/grub.cfg
ignore the OS_PROBER error, it comes because you didn't install os prober, you don't need to if you aren't dual booting

Exiting the ArchIso:
now we'll exit the arch-chroot environment with the command:
Code:
exit
after that, type in:
Code:
umount -a
ignore the "busy" disks, unplug your usb and type in:
Code:
reboot

Booting into the Install:
Finally, we've come so far... we've installed Arch Linux.
you'll see three options, select the first one to boot into archlinux
after that you'll see something saying "ArchLinux login:" type in the username you choose when executing
Code:
useradd -m -G wheel -s /bin/bash name
then, the password you choose when you executed
Code:
passwd name
you have successfuly booted into archliinux

Connecting to the internet:
to list nearby connections type in:
Code:
nmcli device wifi list
then type in:
Code:
nmcli device wifi connect SSID_OR_BSSID password password

Testing the connection:
type in:
Code:
ping archlinux.org
then if it gives a response it means you have connected succesfully, to stop pinging press CTRL + C

Installing a DE (desktop environment):
for this guide we'll use KDE Plasma, if you're coming from windows I recommend this highly cause it has a windows look, for something like macOS you can try gnome, or if you want something different, you can use a tiling manager. to install kde plasma type in:
Code:
sudo pacman -Syu plasma sddm
enter your password, just keep pressing enter until it comes to the point where it asks you if you want to install thse pacakages or not, type in y for that.

Installing additional packages (required for some things):
We need to install a terminal first, I recommend Konsole but you can use something like kitty or anything else.
To install konsole type in:
Code:
sudo pacman -S konsole
we also need some more stuff:
Code:
sudo pacman -S konsole kate firefox
Konsole is a terminal, kate is the text editor and firefox is a web browser, once they're all installed

Start the display manager.
Hello! We're almost complete so type in:
Code:
sudo systemctl enable sddm
then to go into the DE (desktop environment) now type in
Code:
sudo systemctl enable --now sddm

Neofetch!
To get Neofetch type in:
Code:
sudo pacman -S neofetch
A good alternative to neofetch is fastfetch, I recommend using that instead because it's more customizable to get that type in:
Code:
sudo pacman -S fastfetch
and you're all done!
to run neofetch or fastfetch just type in "neofetch" or "fastfetch" in the terminal alone!

well that's the end of the guide, i'll list some stuff

Keybindings
Nano:
CTRL + O = save
CTRL + X = exit
CTRL + R = Read out
CTRL + K = Cut
CTRL + G = Help
CTRL + T = Execute
CTRL + J = Justify
CTRL + C = Location
CTRL + / = Go To Line
CTRL + \ = Replace
CTRL + F = Where Is
CTRL + U = Paste
Not going to list them all but ^ is CTRL in Nano
 
Last edited:
Top Bottom