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
fdisk
to create the partitions (in this example, we will assume that the disk is called/dev/sda
) -
Inside
fdisk
- Create a new GPT partition table: Typeg
We 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
n
to create a new partition - Type
1
to add a number to partition (1
will also be chosen as default) - Type
(Enter)
to select the default starting point for partition - Type
+550M
to select the size of the partition
- Type
-
Inside
fdisk
- Create Partition 2:- Type
n
to create a new partition - Type
2
to add a number to partition (2
will also be chosen as default) - Type
(Enter)
to select the default starting point for partition - Type
+2G
to select the size of the partition
- Type
-
Inside
fdisk
- Create Partition 3:- Type
n
to create a new partition - Type
3
to add a number to partition (3
will 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
t
to start the partition type selection process - Type
1
to select which partition we will set - Type
1
to select theEFI System
type - Type
t
to start the partition type selection process - Type
2
to select which partition we will set - Type
19
to select theLinux swap
type
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
w
to write the partitions. This will also exitfdisk
when 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
vim
editor: -
Edit the
/etc/locale.gen
- Uncomment the line of your choice (line with
en_US.UTF-8 UTF-8
or 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/hostname
file: -
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/hosts
file:- 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
visudo
config file withvim
: -
Inside
visudo
- Uncomment the line about the wheen group (this will be under theUser priviledge specification
subtitle 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
/mnt
directory: -
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-git
directory and make the arch package: