Install Arch Linux with static IP configuration

Here’s the process I followed to install Arch Linux on a VM guest recently.

As soon as you’ve booted the install media, follow these steps.

Step 1: Make sure dhcpcd is stopped before you begin the process

systemctl stop dhcpcd

Step 2: Copy the example config from netctl examples directory to the main config path

cp /etc/netctl/examples/ethernet-static /etc/netctl/ifname-whatever

I usually name the file based on the interface name, ens3, enp4s0, etc. Make changes as needed, the file contents are pretty self explanatory.

Step 3: Bring down the network interface you’re working on using ip command before you begin working on it using netctl

ip link set ifname down

If you don’t do this, an error along the lines of, "interface already activated" will be thrown when you try to bring it up using netctl.

Step 4: Enable the profile and start it using the netctl command

netctl enable profile_name

netctl start profile_name

This is the same profile you created on Step 2.

You should check connectivity using the ping command to be sure. At this stage you should follow the official Arch wiki to continue your installation.

Note: You’ll need to perform these steps again once you’ve booted into an installed system as these changes are only for the install session.

Comments

Comments powered by Disqus