Skip to content

Arch Linux Networking

Mattscreative edited this page Dec 5, 2025 · 2 revisions

Arch Linux Networking Guide

Complete beginner-friendly guide to configuring networking on Arch Linux, including NetworkManager, static IP, wireless, and network troubleshooting.


Table of Contents

  1. NetworkManager Setup
  2. Wired Connection
  3. Wireless Connection
  4. Static IP Configuration
  5. VPN Configuration
  6. DNS Configuration
  7. Troubleshooting

NetworkManager Setup

Install NetworkManager

Install NetworkManager:

# Install NetworkManager
sudo pacman -S networkmanager

# Enable service
sudo systemctl enable NetworkManager
sudo systemctl start NetworkManager

NetworkManager Tools

GUI and CLI tools:

# Install GUI
sudo pacman -S network-manager-applet

# CLI tool
# nmcli is included with NetworkManager

Check Status

Verify NetworkManager:

# Check status
systemctl status NetworkManager

# List connections
nmcli connection show

# List devices
nmcli device status

Wired Connection

Automatic Connection

Ethernet usually works automatically:

# Check connection
nmcli device status

# Should show:
# eth0  ethernet  connected  Wired connection 1

Manual Connection

Create wired connection:

# Create connection
sudo nmcli connection add type ethernet con-name "Wired" ifname eth0

# Activate connection
sudo nmcli connection up "Wired"

Configure Connection

Edit connection:

# Edit connection
nmcli connection edit "Wired connection 1"

# Or use GUI
nm-connection-editor

Wireless Connection

Connect via CLI

Using nmcli:

# Scan for networks
nmcli device wifi list

# Connect to network
nmcli device wifi connect "NetworkName" password "password"

# Connect to hidden network
nmcli device wifi connect "NetworkName" password "password" hidden yes

Connect via GUI

Using GUI:

# Open network manager
nm-connection-editor

# Or use applet
nm-applet

Connect via TUI

Text-based interface:

# Open TUI
nmtui

# Navigate with arrow keys
# Select "Activate a connection"

Static IP Configuration

Configure Static IP

Set static IP:

# Edit connection
nmcli connection edit "Wired connection 1"

# Set IP address
set ipv4.addresses 192.168.1.100/24

# Set gateway
set ipv4.gateway 192.168.1.1

# Set DNS
set ipv4.dns "8.8.8.8 8.8.4.4"

# Set method
set ipv4.method manual

# Save and quit
save
quit

Via GUI

Using GUI:

# Open editor
nm-connection-editor

# Select connection
# IPv4 Settings tab
# Method: Manual
# Add IP, Gateway, DNS

VPN Configuration

OpenVPN

Install OpenVPN:

# Install OpenVPN
sudo pacman -S openvpn networkmanager-openvpn

# Restart NetworkManager
sudo systemctl restart NetworkManager

Import config:

# Via GUI
nm-connection-editor
# Add > VPN > OpenVPN
# Import .ovpn file

WireGuard

Install WireGuard:

# Install WireGuard
sudo pacman -S wireguard-tools networkmanager-wireguard

# Restart NetworkManager
sudo systemctl restart NetworkManager

Configure:

# Create config
sudo vim /etc/wireguard/wg0.conf

Example config:

[Interface]
PrivateKey = YOUR_PRIVATE_KEY
Address = 10.0.0.2/24

[Peer]
PublicKey = SERVER_PUBLIC_KEY
Endpoint = server.example.com:51820
AllowedIPs = 0.0.0.0/0

Start WireGuard:

# Start interface
sudo wg-quick up wg0

# Enable at boot
sudo systemctl enable wg-quick@wg0

DNS Configuration

Configure DNS

Set DNS servers:

# Edit connection
nmcli connection edit "Wired connection 1"

# Set DNS
set ipv4.dns "8.8.8.8 8.8.4.4 1.1.1.1"

# Or IPv6
set ipv6.dns "2001:4860:4860::8888"

# Save
save
quit

System-wide DNS

Edit resolv.conf:

# Install resolvconf
sudo pacman -S openresolv

# Or use systemd-resolved
sudo systemctl enable systemd-resolved
sudo systemctl start systemd-resolved

Edit resolved config:

sudo vim /etc/systemd/resolved.conf

Add:

[Resolve]
DNS=8.8.8.8 8.8.4.4

Troubleshooting

No Internet Connection

Check connection:

# Check devices
nmcli device status

# Check connections
nmcli connection show

# Restart NetworkManager
sudo systemctl restart NetworkManager

WiFi Not Working

Check wireless:

# Check WiFi device
nmcli device wifi list

# Check if WiFi enabled
rfkill list

# Unblock WiFi
sudo rfkill unblock wifi

Connection Drops

Check logs:

# NetworkManager logs
journalctl -u NetworkManager

# Check interface
ip link show

# Restart interface
sudo ip link set wlan0 down
sudo ip link set wlan0 up

DNS Issues

Test DNS:

# Test DNS
nslookup google.com

# Use different DNS
echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf

# Flush DNS cache
sudo systemd-resolve --flush-caches

Summary

This guide covered:

  1. NetworkManager - Network management
  2. Wired connection - Ethernet setup
  3. Wireless connection - WiFi setup
  4. Static IP - Manual IP configuration
  5. VPN - OpenVPN and WireGuard
  6. DNS - DNS configuration
  7. Troubleshooting - Common issues

Key Takeaways:

  • NetworkManager manages all networking
  • Use nmcli for CLI
  • Use nmtui for text interface
  • Use GUI for easy configuration
  • Check logs for troubleshooting

Next Steps


This guide is based on the ArchWiki. For the most up-to-date information, always refer to the official ArchWiki.

Clone this wiki locally