Install Arch Linux
Info
This guide is based off of the DistroTube Arch Linux Installation Guide 2020
Tip
There is a new method for installing Arch linux using a script, while this is still in beta, they are slowly starting to roll it out to users. You can find more infor below:
Base System Install
-
Set keyboard layout:
-
Check that internet services are working:
-
Update the system clock:
-
Partition the disks
-
List the disks in your system:
-
Open
fdiskto create the partitions (in this example, we will assume that the disk is called/dev/sda) -
Inside
fdisk- Create a new GPT partition table: TypegWe will create 3 new partitions, as shown in table below:Partition # Type Size Partition 1 boot 550M Partition 2 swap 2G Partition 3 /(rest) -
Inside
fdisk- Create Partition 1:- Type
nto create a new partition - Type
1to add a number to partition (1will also be chosen as default) - Type
(Enter)to select the default starting point for partition - Type
+550Mto select the size of the partition
- Type
-
Inside
fdisk- Create Partition 2:- Type
nto create a new partition - Type
2to add a number to partition (2will also be chosen as default) - Type
(Enter)to select the default starting point for partition - Type
+2Gto select the size of the partition
- Type
-
Inside
fdisk- Create Partition 3:- Type
nto create a new partition - Type
3to add a number to partition (3will also be chosen as default) - Type
(Enter)to select the default starting point for partition - Type
(Enter)to select the remaining disk space to be allocated to partition 3
- Type
-
Inside
fdisk- Select partition types- Type
tto start the partition type selection process - Type
1to select which partition we will set - Type
1to select theEFI Systemtype - Type
tto start the partition type selection process - Type
2to select which partition we will set - Type
19to select theLinux swaptype
Partition 3 should be set as
Linux filesystem, however as that is the default setting when the partition was created, we don't need to change it. - Type
-
Inside
fdisk- Write the partitions to the disk- Type
wto write the partitions. This will also exitfdiskwhen executed
- Type
-
-
-
Make the three filesystems for the three partitions that were created. Execute the following commands in order:
-
Mount the Linux filesystem partition
-
Install base system for Arch:
-
Generate file system table:
-
Change into the root directory:
-
Set the time-zone (we set the Zurich timezone here):
Tip
You can list the regions by running:
ls /usr/share/zoneinfo/ -
Set the locale
-
Start by installing the
vimeditor: -
Edit the
/etc/locale.gen- Uncomment the line of your choice (line with
en_US.UTF-8 UTF-8or line withfr_CH.UTF-8 UTF-8) - Save and exit the file
- Uncomment the line of your choice (line with
-
Run the command:
-
-
Set the hostname
-
Create and edit the
/etc/hostnamefile: -
Write the hostname of your computer (this is the name of the computer)
Where
<hostname>is the chosen hostname of the computer -
Edit the
/etc/hostsfile:- There should be a few lines commented in this file
- At the end of the file add the following
- Save and exit the file
-
-
Create password for root:
-
Create non-root user and password for that user:
Where
and are the chosen username and password. -
Give non-root user sudo rights:
-
Install
sudo: -
Allow members for the wheel group to access sudo
-
Open the
visudoconfig file withvim: -
Inside
visudo- Uncomment the line about the wheen group (this will be under theUser priviledge specificationsubtitle in the file, maybe line 82) - Exit and save the file
-
-
Install grub:
-
Install EFI associate packages:
-
Make EFI directory and boot directory:
-
Mount partition:
-
Run grub-install command:
-
Generate grub config file:
Other Stuff Before Rebooting
-
Install network manager:
-
Enable network manager with systemd:
-
Exit out of
chroot: -
Unmount the
/mntdirectory: -
Shutdown the system (don't reboot this way you have time to remove installation media):
Install AUR and yay Utility
-
Instal makepkg capabilities:
-
Install AUR:
-
Go into the
yay-gitdirectory and make the arch package: