Skip to content

CachyOS Network Configuration

Mattscreative edited this page Dec 5, 2025 · 2 revisions

CachyOS Network Configuration Guide

Complete beginner-friendly guide to network configuration on CachyOS, including wired, wireless, VPN, and network troubleshooting.


Table of Contents

  1. Understanding Linux Networking
  2. NetworkManager Configuration
  3. Wired Network Setup
  4. Wireless Network Setup
  5. Network Interface Configuration
  6. DNS Configuration
  7. VPN Configuration
  8. Network Troubleshooting

Understanding Linux Networking

Network Components

Linux networking uses several components:

  1. Network Interface: Physical or virtual network connection
  • Ethernet: Wired connection (eth0, enp0s3, etc.)
  • Wi-Fi: Wireless connection (wlan0, wlp2s0, etc.)
  • Virtual: VPN, bridge, etc.
  1. NetworkManager: Network management service
  • What it does: Manages network connections
  • GUI: Provides graphical network settings
  • CLI: Command-line tools (nmcli)
  1. IP Address: Network identifier
  • IPv4: Traditional IP addresses (192.168.1.1)
  • IPv6: Modern IP addresses (2001:db8::1)
  1. DNS: Domain Name System
  • What it does: Converts domain names to IP addresses
  • Example: google.com → 142.250.191.14

Network Configuration Methods

Two main methods:

  • NetworkManager: Easy, graphical, recommended
  • Manual configuration: Advanced, command-line

This guide focuses on NetworkManager (easier for beginners).


NetworkManager Configuration

What is NetworkManager?

NetworkManager is the network management service on CachyOS.

What it does:

  • Manages connections: Handles wired, wireless, VPN
  • Automatic configuration: Configures networks automatically
  • GUI tools: Provides graphical interface
  • CLI tools: Command-line interface (nmcli)

Installing NetworkManager

Check if installed:

pacman -Q networkmanager

Install NetworkManager:

sudo pacman -S networkmanager

What this does:

  • Installs NetworkManager service
  • Installs network management tools
  • Sets up network configuration

Start NetworkManager:

sudo systemctl enable --now NetworkManager.service

What this does:

  • Enables NetworkManager at boot
  • Starts NetworkManager immediately
  • Makes network management available

NetworkManager GUI

Launch GUI:

nm-connection-editor

Or from desktop:

  • Open network settings in desktop environment
  • Usually in system settings

GUI features:

  • View connections: See all network connections
  • Add connections: Create new network connections
  • Edit connections: Modify existing connections
  • Delete connections: Remove connections

NetworkManager CLI (nmcli)

nmcli is the command-line tool for NetworkManager.

View network status:

nmcli

What this does:

  • Shows network connection status
  • Lists active connections
  • Shows device information

Example output:

enp0s3: connected to Wired connection 1
        "Ethernet"
        ethernet (e1000), AA:BB:CC:DD:EE:FF, hw, mtu 1500
        ip4 default
        inet4 192.168.1.100/24
        route4 0.0.0.0/0
        route4 192.168.1.0/24
        inet6 fe80::aabb:ccdd:eeff/64

What this means:

  • enp0s3: Network interface name
  • connected: Connection is active
  • inet4 192.168.1.100/24: IPv4 address
  • ip4 default: Default route

List all connections:

nmcli connection show

What this does:

  • Lists all configured connections
  • Shows connection names and types
  • Shows active connections

List network devices:

nmcli device status

What this does:

  • Lists all network devices
  • Shows device status (connected, disconnected, etc.)
  • Shows device type

Wired Network Setup

Connecting Ethernet Cable

Physical connection:

  1. Connect Ethernet cable to computer
  2. Connect other end to router/switch
  3. NetworkManager should detect automatically

Check connection:

nmcli device status

What to look for:

  • Device shows as "connected"
  • IP address is assigned
  • Can access internet

Configuring Wired Connection

Automatic configuration (DHCP):

  • Default: NetworkManager uses DHCP automatically
  • What it does: Gets IP address from router
  • Usually works: No configuration needed

Manual configuration:

  1. Open nm-connection-editor
  2. Select wired connection
  3. Click "Edit"
  4. Go to "IPv4 Settings"
  5. Change "Method" to "Manual"
  6. Add IP address, gateway, DNS
  7. Click "Save"

Using nmcli:

nmcli connection modify "Wired connection 1" ipv4.addresses 192.168.1.100/24
nmcli connection modify "Wired connection 1" ipv4.gateway 192.168.1.1
nmcli connection modify "Wired connection 1" ipv4.dns "8.8.8.8 8.8.4.4"
nmcli connection modify "Wired connection 1" ipv4.method manual

What this does:

  • Sets static IP address
  • Sets gateway (router)
  • Sets DNS servers
  • Uses manual configuration

Apply changes:

nmcli connection up "Wired connection 1"

What this does:

  • Applies new configuration
  • Activates connection
  • Uses new settings

Troubleshooting Wired Connection

No connection:

  1. Check cable is plugged in
  2. Check cable is working
  3. Check router is on
  4. Check NetworkManager is running

Check NetworkManager:

sudo systemctl status NetworkManager

Restart NetworkManager:

sudo systemctl restart NetworkManager

Check interface:

ip link show

What this does:

  • Shows network interfaces
  • Shows interface status
  • Shows if interface is up

Bring interface up:

sudo ip link set enp0s3 up

What this does:

  • Brings interface online
  • Enables network interface
  • enp0s3: Your interface name

Wireless Network Setup

Connecting to Wi-Fi

Using GUI:

  1. Click network icon in system tray
  2. Select Wi-Fi network
  3. Enter password if required
  4. Click "Connect"

Using nmcli:

# Scan for networks
nmcli device wifi list

# Connect to network
nmcli device wifi connect "Network-Name" password "password"

What this does:

  • wifi list: Shows available networks
  • wifi connect: Connects to network
  • Requires network name and password

Example:

nmcli device wifi connect "MyWiFi" password "mypassword123"

Configuring Wi-Fi Connection

View Wi-Fi connections:

nmcli connection show

Edit Wi-Fi connection:

nmcli connection edit "MyWiFi"

What this does:

  • Opens interactive editor
  • Can modify connection settings
  • Type help for commands

Or use GUI:

nm-connection-editor

Common settings:

  • SSID: Network name
  • Password: Wi-Fi password
  • Security: WPA2, WPA3, etc.
  • IP settings: DHCP or manual

Wi-Fi Security

Supported security types:

  • WPA2: Most common (recommended)
  • WPA3: Newer, more secure
  • WPA: Older (less secure)
  • Open: No password (not secure)

Setting security:

  • Usually detected automatically
  • Enter password when connecting
  • NetworkManager handles security

Troubleshooting Wi-Fi

Wi-Fi not showing:

  1. Check Wi-Fi is enabled
  2. Check wireless card is detected
  3. Check drivers are installed

Check wireless card:

lspci | grep -i network

What this does:

  • Lists network devices
  • Shows if wireless card is detected

Check Wi-Fi interface:

ip link show

What this does:

  • Shows network interfaces
  • Look for wlan0 or wlp2s0 (wireless interfaces)

Enable Wi-Fi:

nmcli radio wifi on

What this does:

  • Enables Wi-Fi radio
  • Turns on wireless interface

Check Wi-Fi status:

nmcli radio wifi

Output:

  • enabled: Wi-Fi is on
  • disabled: Wi-Fi is off

Network Interface Configuration

Viewing Network Interfaces

List interfaces:

ip link show

What this does:

  • Shows all network interfaces
  • Shows interface status
  • Shows interface names

Example output:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500
3: wlan0: <BROADCAST,MULTICAST> mtu 1500

What this means:

  • lo: Loopback (localhost)
  • enp0s3: Ethernet interface
  • wlan0: Wireless interface
  • UP: Interface is enabled
  • LOWER_UP: Physical link is up

View IP addresses:

ip addr show

What this does:

  • Shows IP addresses for each interface
  • Shows IPv4 and IPv6 addresses
  • Shows network configuration

Configuring Network Interface

Using ip command:

# Bring interface up
sudo ip link set enp0s3 up

# Assign IP address
sudo ip addr add 192.168.1.100/24 dev enp0s3

# Add default route
sudo ip route add default via 192.168.1.1

What this does:

  • Enables network interface
  • Assigns IP address
  • Sets default gateway

** Note**: These changes are temporary (lost on reboot)

Permanent configuration:

  • Use NetworkManager (recommended)
  • Or edit network configuration files

Network Interface Names

Modern naming:

  • enp0s3: Ethernet, PCI bus 0, slot 3
  • wlp2s0: Wireless, PCI bus 2, slot 0
  • Predictable: Names don't change

Old naming:

  • eth0: First Ethernet
  • wlan0: First wireless
  • May change: Names can change

Find your interface name:

ip link show

DNS Configuration

What is DNS?

DNS (Domain Name System) converts domain names to IP addresses.

Why it matters:

  • Website access: Need DNS to access websites
  • Speed: Faster DNS = faster website loading
  • Reliability: Good DNS = reliable internet

Configuring DNS

Using NetworkManager:

  1. Open nm-connection-editor
  2. Select connection
  3. Click "Edit"
  4. Go to "IPv4 Settings" or "IPv6 Settings"
  5. Add DNS servers
  6. Click "Save"

Using nmcli:

nmcli connection modify "Wired connection 1" ipv4.dns "8.8.8.8 8.8.4.4"

What this does:

  • Sets DNS servers
  • 8.8.8.8: Google DNS (primary)
  • 8.8.4.4: Google DNS (secondary)

Apply changes:

nmcli connection up "Wired connection 1"

Or restart NetworkManager:

sudo systemctl restart NetworkManager

Popular DNS Servers

Google DNS:

  • Primary: 8.8.8.8
  • Secondary: 8.8.4.4
  • Fast and reliable

Cloudflare DNS:

  • Primary: 1.1.1.1
  • Secondary: 1.0.0.1
  • Privacy-focused

Quad9 DNS:

  • Primary: 9.9.9.9
  • Secondary: 149.112.112.112
  • Security-focused

Using systemd-resolved:

sudo nano /etc/systemd/resolved.conf

Add:

[Resolve]
DNS=1.1.1.1 8.8.8.8

Restart:

sudo systemctl restart systemd-resolved

Testing DNS

Test DNS resolution:

nslookup google.com

What this does:

  • Tests DNS lookup
  • Shows if DNS is working
  • Shows resolved IP address

Test with specific DNS:

nslookup google.com 8.8.8.8

What this does:

  • Uses specific DNS server
  • Tests that DNS server
  • Shows response time

VPN Configuration

What is VPN?

VPN (Virtual Private Network) creates secure connection over internet.

Why use VPN:

  • Privacy: Encrypts internet traffic
  • Security: Protects on public Wi-Fi
  • Access: Access restricted content
  • Anonymity: Hides your IP address

VPN Types

Supported VPN types:

  • OpenVPN: Most common
  • WireGuard: Modern, fast
  • PPTP: Older (less secure)
  • L2TP/IPSec: Common
  • IKEv2: Modern

Configuring VPN

Using NetworkManager GUI:

  1. Open nm-connection-editor
  2. Click "Add"
  3. Select "VPN"
  4. Choose VPN type
  5. Enter connection details
  6. Click "Save"

Using nmcli:

# Add OpenVPN connection
nmcli connection add type vpn vpn-type openvpn \
  con-name "MyVPN" \
  vpn.data "remote=vpn.example.com, username=user, password=pass"

What this does:

  • Creates VPN connection
  • Sets VPN type
  • Configures connection details

Connect to VPN:

nmcli connection up "MyVPN"

Disconnect from VPN:

nmcli connection down "MyVPN"

VPN Configuration Files

OpenVPN config file:

sudo nano /etc/openvpn/client/client.conf

WireGuard config file:

sudo nano /etc/wireguard/wg0.conf

Import config:

nmcli connection import type openvpn file /path/to/config.ovpn

What this does:

  • Imports VPN configuration
  • Creates NetworkManager connection
  • Makes VPN available

Network Troubleshooting

No Internet Connection

Check connection status:

nmcli

Check if connected:

ping -c 3 8.8.8.8

What this does:

  • Tests internet connectivity
  • Pings Google DNS
  • Shows if internet works

If ping fails:

  1. Check network cable (wired)
  2. Check Wi-Fi connection (wireless)
  3. Check router is on
  4. Check NetworkManager is running

Slow Internet

Test connection speed:

# Install speedtest
sudo pacman -S speedtest-cli

# Run speedtest
speedtest-cli

What this does:

  • Tests internet speed
  • Shows download/upload speeds
  • Helps identify issues

Check DNS speed:

time nslookup google.com

What this does:

  • Tests DNS response time
  • Slow DNS = slow website loading
  • Consider changing DNS

Network Interface Issues

Check interface status:

ip link show

Bring interface up:

sudo ip link set enp0s3 up

Check interface statistics:

ip -s link show enp0s3

What this does:

  • Shows interface statistics
  • Shows packets sent/received
  • Shows errors

DNS Issues

Test DNS:

nslookup google.com

If DNS fails:

  1. Check DNS configuration
  2. Try different DNS server
  3. Check firewall settings

Flush DNS cache:

sudo systemd-resolve --flush-caches

What this does:

  • Clears DNS cache
  • Forces new DNS lookups
  • May fix DNS issues

Firewall Issues

Check firewall status:

sudo firewall-cmd --state

What this does:

  • Shows if firewall is running
  • May block network connections

Temporarily disable firewall (testing only):

sudo systemctl stop firewalld

** Warning**: Only for testing! Re-enable after.


Additional Resources


Summary

This guide covered:

  1. Understanding Linux networking - Network components and methods
  2. NetworkManager - Network management service
  3. Wired network - Ethernet configuration
  4. Wireless network - Wi-Fi configuration
  5. Network interfaces - Interface management
  6. DNS configuration - Domain name resolution
  7. VPN configuration - Virtual private networks
  8. Troubleshooting - Common network issues

Key Takeaways:

  • NetworkManager is the main network management tool
  • Use GUI (nm-connection-editor) or CLI (nmcli)
  • Most networks configure automatically (DHCP)
  • DNS affects website loading speed
  • VPN provides secure connections
  • Check connection status with nmcli and ping
  • NetworkManager handles most network tasks automatically

This guide is based on the CachyOS Wiki and Arch Linux Wiki and expanded with detailed explanations for beginners. For the most up-to-date network configuration information, always refer to the official documentation.

Clone this wiki locally