To install Arch Linux in UEFI mode you need a hard disk with a GPT partition table. A bootable usb-stick with Ubuntu is very handy to do it for unexperienced users. Also a good tip for unexperienced users, install arch linux on an empty drive, and unplug other drives, so you can't mess up with already installed systems.

Download the latest iso image from : https://www.archlinux.org/download/

Once you downloaded the iso, write it to an usb-stick. If you are under windows use rufus (https://rufus.ie/) to create a bootable usb stick.

Under linux you can use dd or gnome-disk-utility to make a bootable usb-stick

gnome-disk-utility

gnome-disk-utility

Reboot your computer and boot the UEFI partition from your usb drive !

Be sure to have wired ethernet, I will not explain wireless install. After the system is up and running, configuring wireless is easy.

After succesfull boot, you get a nice prompt :
root@archiso ~ #
waiting for your commands. About the commands : type them exactly like I do. echo > and echo >> are 2 different commands. To install arch, you do it as root, and giving wrong commands will result in fucked up system install. You are warned !

Ok, we are @ the command prompt. The easiest way to install arch linux, is doing it from another computer. I for example, I install arch via my raspberry pi.

First of all, we check if we have internet.
root@archiso ~ # ping -c 3 www.google.com
PING www.google.com(ams16s29-in-x04.1e100.net (2a00:1450:400e:804::2004)) 56 data bytes
64 bytes from ams16s29-in-x04.1e100.net (2a00:1450:400e:804::2004): icmp_seq=1 ttl=54 time=29.6 ms
64 bytes from ams16s29-in-x04.1e100.net (2a00:1450:400e:804::2004): icmp_seq=2 ttl=54 time=27.7 ms
64 bytes from ams16s29-in-x04.1e100.net (2a00:1450:400e:804::2004): icmp_seq=3 ttl=54 time=35.4 ms
--- www.google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 6ms
rtt min/avg/max/mdev = 27.717/30.897/35.355/3.252 ms

For those who want to install from another computer :
root@archiso ~ # ip addr
1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp4s0: mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether e0:d5:5e:6a:0b:95 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.156/24 brd 192.168.0.255 scope global dynamic noprefixroute enp4s0
valid_lft 872sec preferred_lft 872sec
inet6 2a02:1811:c420:c600:a8a6:6456:884c:e229/64 scope global temporary dynamic
valid_lft 567037sec preferred_lft 48637sec
inet6 2a02:1811:c420:c600:ca90:b0a0:84c:e1e0/64 scope global dynamic mngtmpaddr noprefixroute
valid_lft 567037sec preferred_lft 48637sec
inet6 fe80::6ca6:9b26:6b19:14ca/64 scope link noprefixroute
valid_lft forever preferred_lft forever

The inet part of the output shows your current IP address. But to be able to ssh to the computer you need to set a password and setup ssh.
[root@archiso /]# passwd New password:
Retype new password:
passwd: password updated successfully


[root@archiso /]# systemctl enable sshd
After that you can ssh to your arch install pc via terminal : ssh root@your-ip-address, or windows users can use putty (https://www.putty.org/).

1. First we need to look at our system drive(s) with the command : root@archiso ~ # lsblk
I list here the output from my sytem :
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 491.2M 1 loop /run/archiso/sfs/airootfs
sda 8:0 0 931.5G 0 disk
sdb 8:16 0 223.6G 0 disk
├─sdb1 8:17 0 200M 0 part
└─sdb2 8:18 0 223.4G 0 part
sdc 8:32 0 465.8G 0 disk
└─sdc1 8:33 0 465.8G 0 part
sdd 8:48 1 14.6G 0 disk
├─sdd1 8:49 1 604M 0 part /run/archiso/bootmnt
└─sdd2 8:50 1 64M 0 part
sde 8:64 0 238.5G 0 disk
├─sde1 8:65 0 499M 0 part
├─sde2 8:66 0 100M 0 part
├─sde3 8:67 0 16M 0 part
└─sde4 8:68 0 237.9G 0 part
sr0 11:0 1 1024M 0 rom

As you can see, all disks have parts, except sda, and that's the one i'm gonna use. If you want more info about the drives :
root@archiso ~ # lsblk -f

If you plan to install arch on a hard drive that already have partitions, be sure to pick the right one because we will erase all data on it. As I'm going to use sda, all my commands will have the syntax /dev/sda. Make sure to replace the commands with your choosen drive. Of course you can install arch on a partition from an already existing partition on an EFI bootable disk, but this is stuff for another howto on user requests.

2. Time to partition our drive. I use 3 partitions /boot, / (root) and /home. /home is optional. If you plan to use a /home make sure the / (root) partition is at least 20 Gig.

root@archiso ~ # fdisk /dev/sda (remember my warning about sda !)
Welcome to fdisk (util-linux 2.33.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Command (m for help):

Press m to see the aviable options. Type p to see te current partitions. I you are sure you are at the right disk

Command (m for help): g
Created a new GPT disklabel (GUID: E2CE30A7-B7E6-1148-A041-F66B0E421E41).

Next we need to create our partitions.

Command (m for help): n

Partition number (1-128, default 1):
First sector (2048-1953523021, default 2048): January 30, 2011 (accept default, just press enter)
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-1953523021, default 1953523021): +512M (type in +512M [enter])

Created a new partition 1 of type 'Linux filesystem' and of size 512 MiB.

This is mandatory to create such a 512M partition te be able to boot via efi !

To make a root partition, skip if you don't want a seperate root.

Command (m for help): n
Partition number (2-128, default 2):
First sector (1050624-1953523021, default 1050624): (accept default, just press enter)
Last sector, +/-sectors or +/-size{K,M,G,T,P} (1050624-1953523021, default 1953523021): +50G (type in +50 [enter] or the size you want (at least 20G) and press [enter])

Created a new partition 2 of type 'Linux filesystem' and of size 50 GiB.

Now we will use the rest of the drive for our /home or if you skipped previous step we make only a root system. Of course you can choose a different size by defining the size as in the first example.

Command (m for help): n
Partition number (3-128, default 3):
First sector (105908224-1953523021, default 105908224): (accept default, just press enter)
Last sector, +/-sectors or +/-size{K,M,G,T,P} (105908224-1953523021, default 1953523021): (accept default, just press enter) or enter a different size.

Created a new partition 3 of type 'Linux filesystem' and of size 881 GiB.

Now that we created our partitions, it's time to save all our work.

Command (m for help): w

The hardest part is done. Time now to make filesystems on our partitions.

root@archiso ~ # mkfs.fat -F32 /dev/sda1 (this is mandatory, our 512M partition must be formatted to fat 32)
mkfs.fat 4.1 (2017-01-24)

root@archiso ~ # mkfs.ext4 /dev/sda2

mke2fs 1.45.0 (6-Mar-2019)
Creating filesystem with 13107200 4k blocks and 3276800 inodes
Filesystem UUID: f99f3f41-0e36-409b-bfae-b5020e0c0a18
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424

Allocating group tables: done
Writing inode tables: done
Creating journal (65536 blocks): done
Writing superblocks and filesystem accounting information: done

Skip this step if you don't have a separate /home else :

root@archiso ~ # mkfs.ext4 /dev/sda3

mke2fs 1.45.0 (6-Mar-2019)
Creating filesystem with 230951849 4k blocks and 57745408 inodes
Filesystem UUID: 2f73e347-2066-4708-b1eb-ee03ebc1e3e9
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848

Allocating group tables: done
Writing inode tables: done
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information: done

Now it's time to mount our partitions. For now we don't mount our 1st partition, we start with the second or final partition !

root@archiso ~ # mount /dev/sda2 /mnt

For those with a separate /home :

root@archiso ~ # mkdir /mnt/home

root@archiso ~ # mount /dev/sda3 /mnt

Now we can check if everything is fine :
root@archiso ~ # lsblk /dev/sda

sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 512M 0 part
├─sda2 8:2 0 50G 0 part /mnt
└─sda3 8:3 0 881G 0 part /mnt/home


Before we bootstrap arch linux, we make sure that we have the latest packages.

root@archiso ~ # pacman -Syy

:: Synchronizing package databases...
core 134.6 KiB 561K/s 00:00 [######################################] 100%
extra 1666.8 KiB 1655K/s 00:01 [######################################] 100%
community

To make use of the fastest mirrors, we will install reflector. It's important to do it now, because the file will be used in our installed system.

root@archiso ~ # pacman -S reflector

<resolving dependencies...
looking for conflicting packages...

Packages (1) reflector-2019.3-1

Total Download Size: 0.02 MiB
Total Installed Size: 0.09 MiB

:: Proceed with installation? [Y/n]
:: Retrieving packages...
reflector-2019.3-1-any 18.1 KiB 235K/s 00:00 [######################################] 100%
(1/1) checking keys in keyring [######################################] 100%
(1/1) checking package integrity [######################################] 100%
(1/1) loading package files [######################################] 100%
(1/1) checking for file conflicts [######################################] 100%
:: Processing package changes...
(1/1) installing reflector [######################################] 100%
Optional dependencies for reflector
rsync: rate rsync mirrors [installed]
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...

After we install reflector, time to use it.

root@archiso ~ # reflector --country="Belgium" --country="Germany" --country="Netherlands" --age 12 --sort rate --save /etc/pacman.d/mirrorlist

The option country is obvious. I live in Belgium and 2 of my neighbours are Germany and the Netherlands. Change to fit your needs. You don't need to add more than 1 country. The --age 12 option means, mirrors that where updated in the last 12 hours. We sort the list with the fastest mirror on top, and we save the file.

Now everything is in place and we can bootstrap arch to our system.

root@archiso ~ # pacstrap -i /mnt base base-devel

On every question, just press [enter], accepting te defaults.

Now that our system is in place, we need to add content to our fstab file in our new system.

root@archiso ~ # genfstab -U -p /mnt >> /mnt/etc/fstab (remember my warning about syntax !)

To see the content of the created file :

root@archiso ~ # cat /mnt/etc/fstab

# Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sda2
UUID=f99f3f41-0e36-409b-bfae-b5020e0c0a18 / ext4 rw,relatime 0 1

# /dev/sda3
UUID=2f73e347-2066-4708-b1eb-ee03ebc1e3e9 /home ext4 rw,relatime 0 2

And finally we gonna chroot into our new system.

root@archiso ~ # arch-chroot /mnt /bin/bash

And we are prompted with a new prompt

[root@archiso /]#

The first thing we will do now, is set a password for root. While you type, you won't see anything.

[root@archiso /]# passwd
New password:
Retype new password:
passwd: password updated successfully

Now we gonna install the locales. English us is mandatory for fallback purposes.

[root@archiso /]# nano /etc/locale.gen

GNU nano 4.1 /etc/locale.gen # Configuration file for locale-gen # # lists of locales that are to be generated by the locale-gen command. # # Each line is of the form: # # <locale> <charset> # # where <locale> is one of the locales given in /usr/share/i18n/locales # and <charset> is one of the character sets listed in /usr/share/i18n/charmaps # # Examples: # en_US ISO-8859-1 # en_US.UTF-8 UTF-8 # de_DE ISO-8859-1 # de_DE@euro ISO-8859-15 # # The locale-gen command will generate all the locales, # placing them in /usr/lib/locale. # # A list of supported locales is included in this file. # Uncomment the ones you need. # #aa_DJ.UTF-8 UTF-8 #aa_DJ ISO-8859-1 #aa_ER UTF-8 #aa_ER@saaho UTF-8 #aa_ET UTF-8 #af_ZA.UTF-8 UTF-8 #af_ZA ISO-8859-1 #agr_PE UTF-8 #ak_GH UTF-8 #am_ET UTF-8 #an_ES.UTF-8 UTF-8

Place the cursor on the line #aa_DJ.UTF-8 UTF-8 and then press ctrl+w
type after search en_US and press enter

#en_SG.UTF-8 UTF-8 #en_SG ISO-8859-1 #en_US.UTF-8 UTF-8 #en_US ISO-8859-1 #en_ZA.UTF-8 UTF-8

and uncomment #en_US.UTF-8 UTF-8 by removing the #

My native language is dutch and to find my locales, i press ctrl+w again and I search for nl_BE (Dutch for Belgians)

#niu_NZ UTF-8 #nl_AW UTF-8 nl_BE.UTF-8 UTF-8 #nl_BE ISO-8859-1 #nl_BE@euro ISO-8859-15 #nl_NL.UTF-8 UTF-8 #nl_NL ISO-8859-1 #nl_NL@euro ISO-8859-15

And I uncomment my locale. If you don't know the syntax of your locale, you can browse the list with the keyboard arrow.

After the locale(s) are choosen, we press ctrl+x and accept to write the file by pressing Y and [enter].

Now we generate our locale(s)

[root@archiso /]# locale-gen

Generating locales... en_US.UTF-8... done nl_BE.UTF-8... done Generation complete.

To choose your language as default for the system:
[root@archiso /]# echo "LANG=nl_BE.UTF-8" > /etc/locale.conf, ofc replace with your locale.

We adjust the clock :
[root@archiso /]# hwclock --systohc --utc

Now we gonna give a name tou our system:
[root@archiso /]# echo "archPC" > /etc/hostname

We add an entry for our host:
[root@archiso /]# echo "127.0.1.1 localhost.localdomain archPC" >> /etc/hosts

We make sure we have internet : [root@archiso /]# pacman -S networkmanager

resolving dependencies... looking for conflicting packages... Packages (22) bluez-libs-5.50-6 dbus-glib-0.110-1 gpm-1.20.7.r27.g1fd1941-1 jansson-2.12-1 js52-52.9.0-2 libdaemon-0.14-4 libmm-glib-1.10.0-1 libndp-1.7-1 libnewt-0.52.20-2 libnm-1.16.0-1 libnm-glib-1.16.0-1 libpgm-5.2.122-3 libsodium-1.0.17-1 libteam-1.28-2 nspr-4.21-1 nss-3.43-1 openssl-1.0-1.0.2.r-1 polkit-0.115+24+g5230646-1 slang-2.3.2-1 wpa_supplicant-2:2.6-2 zeromq-4.3.1-2 networkmanager-1.16.0-1 Total Download Size: 22.66 MiB Total Installed Size: 112.63 MiB :: Proceed with installation? [Y/n]

Press [enter] and we enable networkmanager at boot time:
[root@archiso /]# systemctl enable NetworkManager

Created symlink /etc/systemd/system/multi-user.target.wants/NetworkManager.service → /usr/lib/systemd/system/NetworkManager.service.
Created symlink /etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service → /usr/lib/systemd/system/NetworkManager-dispatcher.service.
Created symlink /etc/systemd/system/network-online.target.wants/NetworkManager-wait-online.service → /usr/lib/systemd/system/NetworkManager-wait-online.service.

Now it's time to make our system bootable:
[root@archiso /]# pacman -S grub efibootmgr

resolving dependencies... looking for conflicting packages... Packages (3) efivar-35-1 efibootmgr-16-1 grub-2:2.02-8 Total Download Size: 6.06 MiB Total Installed Size: 30.35 MiB :: Proceed with installation? [Y/n]
and press [enter]

It is possible to see other systems as well, but it's better to do that after booting in our new system. (pacman -S os-prober ntfs-3g)

Now we mount our efi boot partition:
[root@archiso /]# mkdir /boot/efi
[root@archiso /]# mount /dev/sda1 /boot/efi

Installing grub:
[root@archiso /]# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB

<Installing for x86_64-efi platform.
Installation finished. No error reported.

Generating the grub config:
[root@archiso /]# grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
done

Tip: if you install os-prober and ntfs-3g after rebooting, you need to rerun this grub-mkconfig command again.

And finally we add a user:
[root@archiso /]# useradd -m -g users -G wheel -s /bin/bash serge and ofc change my name by yours.

And the password for the user: [root@archiso /]# passwd serge
New password:
Retype new password:
passwd: password updated successfully


and again you will not see the password you type in.

[root@archiso /]# exit

root@archiso ~ # reboot to rebooting into your new installed Arch Linux system.
Enjoy !