-
-
Notifications
You must be signed in to change notification settings - Fork 1
Arch Linux Networking
Mattscreative edited this page Dec 5, 2025
·
2 revisions
Complete beginner-friendly guide to configuring networking on Arch Linux, including NetworkManager, static IP, wireless, and network troubleshooting.
- NetworkManager Setup
- Wired Connection
- Wireless Connection
- Static IP Configuration
- VPN Configuration
- DNS Configuration
- Troubleshooting
Install NetworkManager:
# Install NetworkManager
sudo pacman -S networkmanager
# Enable service
sudo systemctl enable NetworkManager
sudo systemctl start NetworkManagerGUI and CLI tools:
# Install GUI
sudo pacman -S network-manager-applet
# CLI tool
# nmcli is included with NetworkManagerVerify NetworkManager:
# Check status
systemctl status NetworkManager
# List connections
nmcli connection show
# List devices
nmcli device statusEthernet usually works automatically:
# Check connection
nmcli device status
# Should show:
# eth0 ethernet connected Wired connection 1Create wired connection:
# Create connection
sudo nmcli connection add type ethernet con-name "Wired" ifname eth0
# Activate connection
sudo nmcli connection up "Wired"Edit connection:
# Edit connection
nmcli connection edit "Wired connection 1"
# Or use GUI
nm-connection-editorUsing 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 yesUsing GUI:
# Open network manager
nm-connection-editor
# Or use applet
nm-appletText-based interface:
# Open TUI
nmtui
# Navigate with arrow keys
# Select "Activate a connection"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
quitUsing GUI:
# Open editor
nm-connection-editor
# Select connection
# IPv4 Settings tab
# Method: Manual
# Add IP, Gateway, DNSInstall OpenVPN:
# Install OpenVPN
sudo pacman -S openvpn networkmanager-openvpn
# Restart NetworkManager
sudo systemctl restart NetworkManagerImport config:
# Via GUI
nm-connection-editor
# Add > VPN > OpenVPN
# Import .ovpn fileInstall WireGuard:
# Install WireGuard
sudo pacman -S wireguard-tools networkmanager-wireguard
# Restart NetworkManager
sudo systemctl restart NetworkManagerConfigure:
# Create config
sudo vim /etc/wireguard/wg0.confExample 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@wg0Set 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
quitEdit resolv.conf:
# Install resolvconf
sudo pacman -S openresolv
# Or use systemd-resolved
sudo systemctl enable systemd-resolved
sudo systemctl start systemd-resolvedEdit resolved config:
sudo vim /etc/systemd/resolved.confAdd:
[Resolve]
DNS=8.8.8.8 8.8.4.4
Check connection:
# Check devices
nmcli device status
# Check connections
nmcli connection show
# Restart NetworkManager
sudo systemctl restart NetworkManagerCheck wireless:
# Check WiFi device
nmcli device wifi list
# Check if WiFi enabled
rfkill list
# Unblock WiFi
sudo rfkill unblock wifiCheck logs:
# NetworkManager logs
journalctl -u NetworkManager
# Check interface
ip link show
# Restart interface
sudo ip link set wlan0 down
sudo ip link set wlan0 upTest 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-cachesThis guide covered:
- NetworkManager - Network management
- Wired connection - Ethernet setup
- Wireless connection - WiFi setup
- Static IP - Manual IP configuration
- VPN - OpenVPN and WireGuard
- DNS - DNS configuration
- Troubleshooting - Common issues
Key Takeaways:
- NetworkManager manages all networking
- Use
nmclifor CLI - Use
nmtuifor text interface - Use GUI for easy configuration
- Check logs for troubleshooting
- Arch Linux Security Configuration - Security setup
- Arch Linux System Configuration - System setup
- ArchWiki NetworkManager: https://wiki.archlinux.org/title/NetworkManager
This guide is based on the ArchWiki. For the most up-to-date information, always refer to the official ArchWiki.