Jake@Linux
_

Installing Arch Linux

Easy Arch install tutorial via SSH

Installing Arch Linux via SSH

Hey everybody, what’s going on! Welcome to another install guide. Today we’re diving into installing Arch Linux, but with a twist - we’re doing it via SSH. Now, I know what you’re thinking: “Another Arch install tutorial? Really?” Well, yeah! Because why not? There are tons of guides out there, the Arch Wiki is incredible, and YouTube is full of installation videos. But here’s the thing - this one’s mine, and I’m doing it a little differently.

So here’s the deal: I’ve got this awesome Nova custom laptop, and I wanted to install Arch on it. But since there’s nothing installed on it yet (kind of a chicken and egg situation), I can’t exactly record the installation process directly. The solution? Install it via SSH from my main machine!

Now when I say “remote machine,” I’m really talking about a laptop that’s literally 6 inches away from my “local” machine on the same desk. But here’s the cool part - this method works just as well whether your target machine is 6 inches away or 6,000 miles away. The process is the same, and it’s actually pretty convenient because you can copy and paste commands, which makes life a whole lot easier.

Installing via SSH isn’t just about convenience (though that’s a big part of it). It’s also a great learning experience. You’ll understand how remote administration works, and honestly, it’s just kind of fun to watch commands execute on one machine while you’re working on another. Plus, if you mess something up, you can easily reference documentation on your local machine without switching between terminals.

!! NOTE: !! All commands in this tutorial are run as the root user. If you are not root, be sure to either use sudo or change to root.

Section 1 - Setting Up for SSH Installation

Before we can jump into the actual Arch installation, we need to set up both our remote machine (the one we’re installing Arch on) and our local machine (the one we’re working from) to communicate with each other.

Step 1 - Boot Into the Live ISO

This might sound obvious, but it’s worth mentioning: first, you need to boot your target machine into the Arch Linux live environment. Grab the latest Arch ISO from the official website, create a bootable USB drive, and boot from it. You’ll automatically be logged in as the root user.

Step 2 - Set a Password on the Remote Machine

Here’s where the SSH setup begins. Even though you’re already logged into the live environment as root, we need to set a password for the root account. This password will be used when we SSH in from our local machine.

On the remote machine, run:

passwd

Enter a password when prompted. Make it something you’ll remember - you’ll need it in just a minute. Don’t worry about making it super secure; this is just for the installation process and won’t persist after we finish.

Step 3 - Configure SSH

Now we need to configure SSH to allow root login. By default, SSH doesn’t allow root login for security reasons, but since we’re in a live environment and just doing an installation, we can safely enable it temporarily.

Navigate to the SSH configuration directory and edit the SSH daemon config file:

vim /etc/ssh/sshd_config

Find the line that says #PermitRootLogin, Uncomment it by removing the #.

#change line from this
#PermitRootLogin no
#to this:
PermitRootLogin yes

Save and exit the file.

Now start the SSH service:

systemctl start sshd

Step 4 - Verify Network Connection

Before we can SSH into the remote machine, we need to make sure it has a network connection. If you’re on a wired connection, you should already be good to go. If you’re on WiFi, you’ll need to connect using iwctl:

iwctl

Once in the iwctl prompt, connect to your network:

station wlan0 connect "Your-Network-Name"

Exit iwctl and verify your connection by checking your IP address:

ip addr

Make note of your IP address - you’ll need it for the SSH connection. It’ll be something like 192.168.1.100 or similar.

Step 5 - SSH From Your Local Machine

Now switch over to your local machine. This is where we’ll actually run all our installation commands. From your local machine, SSH into the remote machine with this command:

ssh -o StrictHostKeyCheck=no -o UserKnownHostsFile=/dev/null root@<remoteIpAddress>

Replace <remoteIpAddress> with the actual IP address you noted in the previous step. The -o StrictHostKeyCheck=no and -o UserKnownHostsFile=/dev/null flags tell SSH not to worry about host key verification (since this is a temporary live environment).

Enter the password you set earlier, and boom! You’re now connected to your remote machine via SSH. Everything from this point forward will be executed from your local machine, but it’ll all happen on the remote machine. Pretty cool, right?

Section 2 - Partition and Format Drives

Alright, now we’re getting into the actual installation. Let’s start by partitioning the drive.

Step 1 - Identify Your Target Drive

First things first - we need to figure out which drive we’re installing Arch on. Run this command:

lsblk

This will list all your block devices. In my case, I see:

  • sda - The USB drive with the Arch ISO (we’re booted from this)
  • nvme0n1 - The drive where I’ll install Arch
  • nvme1n1 - A secondary drive that already has Void Linux installed

Important: Make absolutely certain you’re targeting the correct drive. The next steps will erase ALL data on the selected drive. Double-check, triple-check, and maybe even quadruple-check that you’ve got the right one!

Step 2 - Partition the Drive

Time to break out fdisk. This is where we’ll create our partition layout. We’re going with a simple three-partition setup: boot, root, and home.

fdisk /dev/nvme0n1

Replace nvme0n1 with whatever your actual target drive is. Once you’re in fdisk, you’ll see a prompt. Here’s what we’re going to do:

# Create the boot partition
n
(press Enter for default partition 1)
(press Enter for default first sector)
+256M
(if prompted, type 'y' to remove signature)
# Create the root partition
n
(press Enter for default partition 2)
(press Enter for default first sector)
+70G
(if prompted, type 'y' to remove signature)
# Create the home partition
n
(press Enter for default partition 3)
(press Enter for default first sector)
(press Enter for default last sector - uses remaining space)
(if prompted, type 'y' to remove signature)
# Write changes to disk
w

So what did we just do? We created three partitions:

  1. A 256MB boot partition (plenty of space for kernels and bootloader files)
  2. A 70GB root partition (where the system will live)
  3. A home partition that takes up the rest of the drive (for all your personal files)

Note: This guide keeps things simple with ext4 filesystems. If you’re interested in a more advanced setup with LUKS encryption and Btrfs subvolumes, I’ll be publishing a separate guide for that on my website. That setup is great for production use, but it’s a bit more involved, and I wanted to keep this tutorial accessible.

Step 3 - Create Filesystems

Now that we’ve got our partitions carved out, we need to format them with actual filesystems. Think of partitions as empty rooms - we’ve built the walls, but now we need to decide what kind of flooring to put in!

Create the boot partition with FAT32 (required for UEFI):

mkfs.fat -F32 -n Boot /dev/nvme0n1p1

Create the root partition with ext4:

mkfs.ext4 -L Arch /dev/nvme0n1p2

Create the home partition with ext4:

mkfs.ext4 -L home /dev/nvme0n1p3

Let’s verify everything looks good:

lsblk

You should now see your three partitions clearly labeled and ready to go!

Step 4 - Mount Partitions

Filesystems are created, but they’re not accessible yet. We need to mount them in the right places. This is like telling the system “hey, when I go to this location, I want to see this partition.”

Mount the root partition first:

mount /dev/nvme0n1p2 /mnt

Create mountpoints for boot and home:

mkdir /mnt/efi
mkdir /mnt/home

Now mount the boot and home partitions:

mount /dev/nvme0n1p1 /mnt/efi
mount /dev/nvme0n1p3 /mnt/home

Everything’s mounted and ready. Let’s move on to actually installing the system!

Section 3 - Installation

This is where the magic happens. We’re going to use pacstrap to install Arch Linux onto our freshly prepared partitions.

Step 1 - Install Base Packages

Here’s the big command. This will download and install all the essential packages we need:

pacstrap -K /mnt base linux linux-firmware linux-headers intel-ucode base-devel vim networkmanager efibootmgr dosfstools

Note: If you’ve got an AMD processor, replace intel-ucode with amd-ucode.

Let me break down what we’re installing:

  • base - The minimal Arch Linux package set (the foundation of the system)
  • linux - The Linux kernel itself
  • linux-firmware - Firmware files for common hardware
  • linux-headers - Headers for building kernel modules (useful if you need to compile anything)
  • intel-ucode or amd-ucode - Microcode updates for your CPU
  • base-devel - Development tools (includes things like make and compilers)
  • vim - Text editor (feel free to substitute with nano if you prefer)
  • networkmanager - Network management tool (crucial for getting online after installation)
  • efibootmgr - Tools for managing UEFI boot entries
  • dosfstools - Utilities for working with FAT filesystems

This installation will take a few minutes. Grab a coffee, stretch your legs, do whatever you need to do. The time it takes depends on your internet connection and mirror speed.

Step 2 - Generate the Fstab

Once the installation finishes, we need to generate an fstab file. This file tells the system how to mount all the partitions at boot time.

genfstab -U /mnt >> /mnt/etc/fstab

The -U flag uses UUIDs (Universally Unique Identifiers) instead of device names. This is more reliable because device names can change, but UUIDs stay the same.

Step 3 - Chroot Into the New System

Chroot is a way to “change root” - basically, we’re going to pretend our new installation is the actual running system:

arch-chroot /mnt /bin/bash

Your prompt should change, indicating you’re now working inside your new Arch installation. Everything we do from here on out affects the new system, not the live environment.

Section 4 - Installation Configuration

We’ve got Arch installed, but it’s not configured yet. Time to set everything up!

Step 1 - Set the Timezone

Let’s configure the system timezone. Replace America/Chicago with your actual timezone:

ln -sf /usr/share/zoneinfo/America/Chicago /etc/localtime

Not sure what your timezone is? You can explore available timezones:

ls /usr/share/zoneinfo

Now generate /etc/adjtime:

hwclock --systohc

This syncs the hardware clock with the system clock.

Step 2 - Configure Localization

Localization tells the system what language to use and how to format things like dates and numbers. Let’s set that up:

vim /etc/locale.gen

Find your locale in this file (for US English, look for en_US.UTF-8 UTF-8) and uncomment it by removing the # at the beginning of the line. Save and exit.

Now generate the locales:

locale-gen

Create the locale configuration file:

echo "LANG=en_US.UTF-8" > /etc/locale.conf

Step 3 - Set the Hostname

Your hostname is what your computer calls itself on the network. Let’s set one:

echo "Arch-machina" > /etc/hostname

Feel free to use whatever hostname you want. I’m going with Arch-machina because it sounds cool.

Step 4 - Configure the Hosts File

The hosts file maps hostnames to IP addresses. We need to add a few entries:

vim /etc/hosts

Add these lines (replace Arch-machina with your actual hostname):

127.0.0.1    localhost
::1          localhost
127.0.1.1    Arch-machina.localdomain Arch-machina

Step 5 - Generate Initial Ramdisk

The initial ramdisk is what loads before your actual system boots. Let’s regenerate it with our new configuration:

mkinitcpio -P

This should complete without errors. If you see any warnings, they’re usually safe to ignore unless they’re specifically about something critical.

Section 5 - User Management

We’ve got a system, but no users! Let’s fix that.

Step 1 - Set Root Password

First, set a password for the root user:

passwd

Enter and confirm a strong password. This is important for system security!

Step 2 - Create Your User Account

Time to create your personal user account. Replace jake with whatever username you want:

useradd jake

Set a password for your user:

passwd jake

Step 3 - Add User to Groups

Your user needs to be part of certain groups to have proper permissions:

usermod -aG wheel,video,audio,storage,network,kvm jake

Here’s what these groups do:

  • wheel - Allows sudo usage
  • video - Access to video devices
  • audio - Access to audio devices
  • storage - Access to storage devices
  • network - Access to network devices
  • kvm - Access to KVM virtualization

Step 4 - Configure Sudo

Now we need to configure sudo to allow our user to run administrative commands:

EDITOR=vim visudo

Find the line that says # %wheel ALL=(ALL:ALL) ALL and uncomment it by removing the #. This allows anyone in the wheel group to use sudo.

Optionally, you can add a specific line for your user:

jake ALL=(ALL:ALL) ALL

I usually do both - it doesn’t hurt to be explicit.

Section 6 - Install and Configure Bootloader

Almost done! We need to install GRUB so the system can actually boot.

Step 1 - Install GRUB

pacman -S grub

Step 2 - Install GRUB to the EFI Partition

Now we install GRUB to the EFI partition:

grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=Arch

You can replace Arch with whatever you want the boot entry to be called in your UEFI firmware.

Step 3 - Generate GRUB Configuration

Finally, generate the GRUB configuration file:

grub-mkconfig -o /boot/grub/grub.cfg

GRUB will scan for installed operating systems and create boot entries for them. If you have other operating systems installed on other drives (like I do with Void), GRUB should detect them.

Section 7 - Miscellaneous

Step 1 - Enable Network Manager

This step is crucial - without it, you won’t have networking when you boot into your new system!

systemctl enable NetworkManager

This enables NetworkManager to start automatically at boot. Don’t skip this step, or you’ll be wondering why you can’t connect to the internet after installation!

Step 2 - Install Additional Software

Install software or programs you may want to install at this time

xbps-install <list of desired programs>

Step 3 - Use xbps to verify installed programs are configured correctly

xbps-reconfigure -fa

Section 8 - Exit and Reboot

We’re done! Time to wrap things up and boot into our new system.

Step 1 - Exit Chroot

exit

This takes you back to the live environment.

Step 2 - Unmount Partitions

Let’s cleanly unmount everything:

umount -R /mnt

If you get a “target is busy” error, that usually means something is still accessing the mounted filesystems. You can usually ignore this if you’re about to reboot anyway.

Step 3 - Reboot

reboot

Remove the USB drive when the system starts to reboot. If everything went well, you should boot into your new Arch Linux installation!

Congratulations! You’ve successfully installed Arch Linux via SSH. After rebooting, you’ll be greeted with a login prompt. Log in with the username and password you created earlier.

If you’re on WiFi, you’ll need to connect to your network. NetworkManager includes a handy text UI for this:

nmtui

This will bring up a menu where you can select and connect to your WiFi network. Once you’re connected, you’re ready to start installing whatever you need!

From here, the world is your oyster. Want a desktop environment? Install GNOME, KDE, XFCE, or whatever strikes your fancy. Prefer a window manager? Go for i3, bspwm, dwm, or any of the dozens available. Need development tools? Install them. Want to game? Set up Steam and Proton. The beauty of Arch is that you build exactly what you want, nothing more, nothing less.

Look, I get it. Arch has this reputation as being the “hardcore” Linux distribution, the one that separates the wheat from the chaff, the trial by fire for Linux users. But honestly? That reputation is outdated.

Installing Arch isn’t scary if you’re willing to sit down, pay attention to what you’re doing, understand the commands you’re running, and follow directions carefully. The Arch Wiki is incredibly well-documented, and there are countless resources available. The installation process has become much more streamlined over the years, and honestly, it’s not that different from installing other distributions - it’s just more manual.

Is Arch for everyone? No, probably not. But it’s not this impossible mountain to climb that people make it out to be. If you can follow directions and aren’t afraid to read documentation, you can install and use Arch Linux successfully.

Now, this guide showed a pretty basic installation with ext4 filesystems and a straightforward partition layout. In the real world, for a production machine, I’d probably use LUKS encryption and Btrfs with subvolumes for snapshots. That setup is a bit more involved, but it’s worth it for the added security and flexibility. I’ll be creating a separate guide for that setup and posting it on my website in the future.

As for which distribution is “best” - that’s entirely up to you. I’ve been running Void Linux as my daily driver for over a year now and I love it. Before that, I used Arch for a long time. I’ve used Debian, Ubuntu, Fedora, and countless others. They’re all great in their own ways. Arch just happens to work really well for newer hardware and gives you complete control over your system. But Debian is rock solid, Ubuntu is user-friendly, Fedora is cutting-edge - they all have their place.

The point is: use what works for you. Don’t let anyone tell you that your choice of Linux distribution makes you more or less of a “real” Linux user. We’re all part of the same community, and we should be lifting each other up, not tearing each other down over package managers and init systems.

If you found this guide helpful, awesome! Check out my website for more tutorials, including that encryption and Btrfs guide I mentioned. And hey, if you run into issues, don’t be afraid to ask for help. The Linux community is generally pretty helpful, despite what some people might say.

Alright, that’s it for this guide. Stay safe, happy installing, and may your kernel panics be few and far between!