Author: Nael TahchiLast Updated: Tue, Sep 21, 2021
This guide explains how to install Arch Linux on a Vultr cloud server instance.
You can install Arch from the Vultr ISO library or upload a newer version manually.
timedatectl to ensure the system clock is accurate.
# timedatectl set-ntp true
To check the service status, use
View the block devices available with the command
Once you identify the disk, use
parted to partition. This tutorial assumes you chose a standard Vultr server with a single hard drive. Your hard drive will have the name
Create a partition table.
# parted /dev/vda --mklabel msdos
Add a root partition.
# parted /dev/vda --mkpart primary 1MiB -8GiB
Add a swap partition.
# parted /dev/vda --mkpart primary linux-swap -8GiB 100%
Create a new file system on the disk, and it’s recommended to add a label to each using
# mkfs.ext4 -L arch /dev/vda1 # mkswap -L swap /dev/vda2
Mount your file system.
# mount /dev/ disk/by-label/arch /mnt
Turn swap device on.
# swapon /dev/vda2
Use the following command to launch the package installation.
# pacstrap /mnt base linux linux-firmware base-devel vi nano
You need to install a text editor (we install vi and nano here!) and other essential packages such as
base-develif you’re going to be compiling a lot of code, for instance.
This base install comes with
systemd-networkdand that’s what we are going to use in this installation guide. However, you can install other network managers that are easier to use such as
Before we change root into our newly installed system, generate an
# genfstab -U /mnt >> /mnt/etc/fstab
Now, switch over to the new system.
# arch-chroot /mnt
Now you have chrooted into the system, set the timezone, and sync the clock.
# ls /usr/share/zoneinfo/America/
Choose a city from the list, for example: New_York
# ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime # hwclock –systohc
Set the system locale to UTF-8. Visit
locale.gen and uncomment
en_GB.UTF-8 UTF-8, then set the locale.
# nano /etc/locale.gen # echo 'LANG=en_US.UTF-8' > /etc/locale.conf
Find the currently active network adaptor.
# ip addr
This is usually called
enp1s0 or similar.
Write the configuration file:
# nano /etc/systemd/network/enp1s0.network
The content should be as follows:
[Match] Name=enp1s0 [Network] DHCP=yes
This file is case-sensitive. Check Arch Linux Network Configuration for more details on network settings and configurations.
Enable DHCP and DNS resolution to run automatically run at boot.
# systemctl enable systemd-networkd # systemctl enable systemd-resolved
resolv.conf to forward requests to
# ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
Set the system hostname.
# echo '<YOUR_HOSTNAME>' > /etc/hostname
Set up your hosts file by replacing your hostname and your static IP address in place of
# cat <<EOF > /etc/hosts > <YOUR_STATIC_IP> localhost > ::1 localhost > <YOUR_STATIC_IP> <YOUR_HOSTNAME>.localdomain <YOUR_HOSTNAME> > EOF
Run the command
ip addr again to find your static IP.
Install grub, and write a configuration file.
# pacman -S grub # grub-install --target=i386-pc /dev/vda
Note that the argument is the disk itself and not the system partition.
# grub-mkconfig -o /boot/grub/grub.cfg
Set the root password.
Exit the chroot, and reboot the system.
# exit # systemctl poweroff
Go to the Vultr customer portal, remove the ISO, and then restart the server.
Reconnect the VNC console.
Now the system has booted successfully. Login as root with the password you just set up:
# pacman -S sudo
Allow users that you add in group
wheel to use
# cp /etc/sudoers /etc/sudoers.new # sed 's/# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/' -i /etc/sudoers.new # visudo -c -f /etc/sudoers.new && mv /etc/sudoers.new /etc/sudoers
Create a user account.
# useradd --create-home –-groups wheel <yourusername>
Set the user’s password.
# passwd <yourusername>
Log out as root and log in with the newly created user.
# pacman -S ntp # systemctl enable --now ntpd
# pacman -Sy openssh
Edit the configuration file to enable a port. Usually, this is port 22.
# sed 's/#Port 22/Port 22/' -i /etc/ssh/sshd_config
# systemctl enable --now sshd
You should now be able to log in via SSH.
At this point, you can ssh to your newly installed server. However, by default,
sshddoes not allow you to log in as
Arch Linux is a rolling release distribution. That means you can update your system packages anytime. To upgrade all packages at once, use the following command:
# pacman -Syu
After upgrading, you may be prompted with messages requesting further actions.
For more information, check the Arch Linux website