-
-
Notifications
You must be signed in to change notification settings - Fork 1
CachyOS Network Configuration
Complete beginner-friendly guide to network configuration on CachyOS, including wired, wireless, VPN, and network troubleshooting.
- Understanding Linux Networking
- NetworkManager Configuration
- Wired Network Setup
- Wireless Network Setup
- Network Interface Configuration
- DNS Configuration
- VPN Configuration
- Network Troubleshooting
Linux networking uses several components:
- Network Interface: Physical or virtual network connection
- Ethernet: Wired connection (eth0, enp0s3, etc.)
- Wi-Fi: Wireless connection (wlan0, wlp2s0, etc.)
- Virtual: VPN, bridge, etc.
- NetworkManager: Network management service
- What it does: Manages network connections
- GUI: Provides graphical network settings
- CLI: Command-line tools (nmcli)
- IP Address: Network identifier
- IPv4: Traditional IP addresses (192.168.1.1)
- IPv6: Modern IP addresses (2001:db8::1)
- DNS: Domain Name System
- What it does: Converts domain names to IP addresses
- Example: google.com → 142.250.191.14
Two main methods:
- NetworkManager: Easy, graphical, recommended
- Manual configuration: Advanced, command-line
This guide focuses on NetworkManager (easier for beginners).
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)
Check if installed:
pacman -Q networkmanagerInstall NetworkManager:
sudo pacman -S networkmanagerWhat this does:
- Installs NetworkManager service
- Installs network management tools
- Sets up network configuration
Start NetworkManager:
sudo systemctl enable --now NetworkManager.serviceWhat this does:
- Enables NetworkManager at boot
- Starts NetworkManager immediately
- Makes network management available
Launch GUI:
nm-connection-editorOr 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
nmcli is the command-line tool for NetworkManager.
View network status:
nmcliWhat 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 showWhat this does:
- Lists all configured connections
- Shows connection names and types
- Shows active connections
List network devices:
nmcli device statusWhat this does:
- Lists all network devices
- Shows device status (connected, disconnected, etc.)
- Shows device type
Physical connection:
- Connect Ethernet cable to computer
- Connect other end to router/switch
- NetworkManager should detect automatically
Check connection:
nmcli device statusWhat to look for:
- Device shows as "connected"
- IP address is assigned
- Can access internet
Automatic configuration (DHCP):
- Default: NetworkManager uses DHCP automatically
- What it does: Gets IP address from router
- Usually works: No configuration needed
Manual configuration:
- Open
nm-connection-editor - Select wired connection
- Click "Edit"
- Go to "IPv4 Settings"
- Change "Method" to "Manual"
- Add IP address, gateway, DNS
- 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 manualWhat 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
No connection:
- Check cable is plugged in
- Check cable is working
- Check router is on
- Check NetworkManager is running
Check NetworkManager:
sudo systemctl status NetworkManagerRestart NetworkManager:
sudo systemctl restart NetworkManagerCheck interface:
ip link showWhat this does:
- Shows network interfaces
- Shows interface status
- Shows if interface is up
Bring interface up:
sudo ip link set enp0s3 upWhat this does:
- Brings interface online
- Enables network interface
-
enp0s3: Your interface name
Using GUI:
- Click network icon in system tray
- Select Wi-Fi network
- Enter password if required
- 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"View Wi-Fi connections:
nmcli connection showEdit Wi-Fi connection:
nmcli connection edit "MyWiFi"What this does:
- Opens interactive editor
- Can modify connection settings
- Type
helpfor commands
Or use GUI:
nm-connection-editorCommon settings:
- SSID: Network name
- Password: Wi-Fi password
- Security: WPA2, WPA3, etc.
- IP settings: DHCP or manual
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
Wi-Fi not showing:
- Check Wi-Fi is enabled
- Check wireless card is detected
- Check drivers are installed
Check wireless card:
lspci | grep -i networkWhat this does:
- Lists network devices
- Shows if wireless card is detected
Check Wi-Fi interface:
ip link showWhat this does:
- Shows network interfaces
- Look for
wlan0orwlp2s0(wireless interfaces)
Enable Wi-Fi:
nmcli radio wifi onWhat this does:
- Enables Wi-Fi radio
- Turns on wireless interface
Check Wi-Fi status:
nmcli radio wifiOutput:
-
enabled: Wi-Fi is on -
disabled: Wi-Fi is off
List interfaces:
ip link showWhat 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 showWhat this does:
- Shows IP addresses for each interface
- Shows IPv4 and IPv6 addresses
- Shows network configuration
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.1What 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
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 showDNS (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
Using NetworkManager:
- Open
nm-connection-editor - Select connection
- Click "Edit"
- Go to "IPv4 Settings" or "IPv6 Settings"
- Add DNS servers
- 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 NetworkManagerGoogle 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.confAdd:
[Resolve]
DNS=1.1.1.1 8.8.8.8
Restart:
sudo systemctl restart systemd-resolvedTest DNS resolution:
nslookup google.comWhat this does:
- Tests DNS lookup
- Shows if DNS is working
- Shows resolved IP address
Test with specific DNS:
nslookup google.com 8.8.8.8What this does:
- Uses specific DNS server
- Tests that DNS server
- Shows response time
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
Supported VPN types:
- OpenVPN: Most common
- WireGuard: Modern, fast
- PPTP: Older (less secure)
- L2TP/IPSec: Common
- IKEv2: Modern
Using NetworkManager GUI:
- Open
nm-connection-editor - Click "Add"
- Select "VPN"
- Choose VPN type
- Enter connection details
- 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"OpenVPN config file:
sudo nano /etc/openvpn/client/client.confWireGuard config file:
sudo nano /etc/wireguard/wg0.confImport config:
nmcli connection import type openvpn file /path/to/config.ovpnWhat this does:
- Imports VPN configuration
- Creates NetworkManager connection
- Makes VPN available
Check connection status:
nmcliCheck if connected:
ping -c 3 8.8.8.8What this does:
- Tests internet connectivity
- Pings Google DNS
- Shows if internet works
If ping fails:
- Check network cable (wired)
- Check Wi-Fi connection (wireless)
- Check router is on
- Check NetworkManager is running
Test connection speed:
# Install speedtest
sudo pacman -S speedtest-cli
# Run speedtest
speedtest-cliWhat this does:
- Tests internet speed
- Shows download/upload speeds
- Helps identify issues
Check DNS speed:
time nslookup google.comWhat this does:
- Tests DNS response time
- Slow DNS = slow website loading
- Consider changing DNS
Check interface status:
ip link showBring interface up:
sudo ip link set enp0s3 upCheck interface statistics:
ip -s link show enp0s3What this does:
- Shows interface statistics
- Shows packets sent/received
- Shows errors
Test DNS:
nslookup google.comIf DNS fails:
- Check DNS configuration
- Try different DNS server
- Check firewall settings
Flush DNS cache:
sudo systemd-resolve --flush-cachesWhat this does:
- Clears DNS cache
- Forces new DNS lookups
- May fix DNS issues
Check firewall status:
sudo firewall-cmd --stateWhat 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.
- CachyOS System Tweaks - Network optimizations
- CachyOS Post-Installation Guide - System setup
- Arch Linux Wiki - NetworkManager: https://wiki.archlinux.org/title/NetworkManager
- Arch Linux Wiki - Network Configuration: https://wiki.archlinux.org/title/Network_configuration
This guide covered:
- Understanding Linux networking - Network components and methods
- NetworkManager - Network management service
- Wired network - Ethernet configuration
- Wireless network - Wi-Fi configuration
- Network interfaces - Interface management
- DNS configuration - Domain name resolution
- VPN configuration - Virtual private networks
- 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
nmcliandping - 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.