There are several ways to set a static IP on Arch Linux—even if you haven’t installed a “NetworkManager‑style” utility. Many Arch users configure networking manually or use lightweight tools such as systemd-networkd or netctl. Below are a couple of common approaches:
Option 1. Using systemd-networkd
systemd-networkd is a built‐in network management service in systemd. If you choose this method, you’ll create a configuration file for your Ethernet interface.
-
Determine Your Interface Name
Run:
ip link
Look for the name of your Ethernet interface (e.g., enp2s0, eth0, etc.).
-
Create a Network Configuration File
Create a file such as /etc/systemd/network/20-wired.network:
[Match]
Name=enp2s0
[Network]
Address=192.168.1.100/24
Gateway=192.168.1.1
DNS=8.8.8.8
Adjust the interface name, address, gateway, and DNS as appropriate for your network.
-
Enable and Start systemd-networkd
Enable the service so it starts at boot:
sudo systemctl enable systemd-networkd
sudo systemctl start systemd-networkd
(If you’ve been using another DHCP client or network service, make sure it’s stopped to avoid conflicts.)
-
Verify Connectivity
Check that your IP address has been assigned:
ip addr show enp2s0
And verify routing:
ip route
For more details refer to the Arch Wiki article on systemd-networkd.
Option 2. Using netctl
netctl is a profile-based networking tool provided by Arch Linux. It can manage both wired and wireless profiles.
-
Create a New Profile
Create a profile for a static wired connection in /etc/netctl/. For example, create a file named /etc/netctl/static-ethernet with content like:
Description='A basic static ethernet connection'
Interface=enp2s0
Connection=ethernet
IP=static
Address=('192.168.1.100/24')
Gateway='192.168.1.1'
DNS=('8.8.8.8')
Again, adjust values as needed.
-
Enable the Profile
Stop any running DHCP clients if necessary and enable your new netctl profile:
sudo netctl stop "profile-name" # if there's another active profile
sudo netctl start static-ethernet
To enable it at boot:
sudo netctl enable static-ethernet
-
Confirm Your Setup
Verify that the static IP is in use by checking:
ip addr show enp2s0
ip route
For more information see the Arch Wiki article on netctl.
Additional Considerations
-
DHCPCD:
Some installations may use dhcpcd by default. If that’s the case, you can configure static addresses by editing /etc/dhcpcd.conf. Look for an example static configuration in that file, but be careful because running multiple network managers (like dhcpcd and systemd-networkd) simultaneously can lead to conflicts.
-
Disabling Conflicting Services:
If you decide to use systemd-networkd or netctl, ensure that no other networking service (like NetworkManager or dhcpcd) is interfering.
Conclusion
Even though you haven’t installed a “NetworkManager‑style” app, Arch Linux gives you several lightweight choices. Choose the method that best fits your setup:
- Use systemd-networkd for a simple configuration integrated with systemd.
- Use netctl if you prefer a profile-based approach.
- Or, if you’re already using dhcpcd, you can configure a static IP in its config file, though that approach is less common when setting up a static address manually.
Let me know if you need more details on any of these steps!