Networking Setup
Chapter 9 — Configuring Networking
Networking on Linux is managed by a tool called NetworkManager, which handles both wired and wireless connections automatically on most desktop distros. For the majority of users, network setup is invisible — you plug in an Ethernet cable or click a WiFi network and it just works. This chapter covers the graphical tools, how to configure a static IP address, and what to do when things don't connect as expected.
1. How Linux Networking Is Organised
Like audio, networking in Linux has several layers. You don't need to understand them all in depth, but knowing which layer a problem is at saves a lot of troubleshooting time.
2. Wired Ethernet
Ethernet is the simplest case. Plug in a cable and NetworkManager connects automatically — it requests an IP address via DHCP from your router and you're online within seconds. No configuration is needed for most home and office setups.
Verify your Ethernet connection
The network icon in your system tray will show a plug symbol when Ethernet is connected. On GNOME, click the top-right corner and look for the wired network status. On Mint/Cinnamon, the network applet in the taskbar shows connection status.
Interface names follow a predictable pattern on modern Linux:
- enp3s0 / ens33 / eth0 — Ethernet (wired) interfaces.
en= Ethernet,p3s0= PCI bus location. - wlp2s0 / wlan0 — WiFi (wireless) interfaces.
wl= wireless LAN. - lo — the loopback interface (127.0.0.1), always present, always up.
Check your IP address
3. WiFi — Connecting Graphically
WiFi connection on a Linux desktop is nearly identical to Windows. NetworkManager handles scanning, connecting, and saving passwords automatically.
Ubuntu (GNOME)
-
1Click the top-right corner of the screen to open the quick settings panel. Click the WiFi icon or the arrow next to it.
-
2A list of available networks appears. Click your network name.
-
3Enter the WiFi password when prompted and click Connect. NetworkManager saves the password — you won't need to enter it again.
Linux Mint (Cinnamon) / XFCE / MATE
Click the network icon in the system tray (bottom-right of the screen). Available WiFi networks are listed. Click one, enter the password, and connect. The process is identical in behaviour to Windows.
Managing saved connections
To view, edit, or delete saved WiFi connections, right-click the network icon and choose "Edit Connections" (or Network Connections on Mint). This opens the NetworkManager connection editor where you can see all saved networks, change passwords, set auto-connect behaviour, and configure advanced options.
4. WiFi — Connecting from the Terminal
If you need to connect to WiFi without a graphical interface (a server install, a broken desktop, or an SSH session), use nmcli — the NetworkManager command-line tool.
5. Checking Connectivity from the Terminal
A handful of terminal commands are invaluable for diagnosing network problems. These work on every Linux distro and are worth knowing even if you rarely use the terminal.
| Command | What it does | Example |
|---|---|---|
| ping | Sends packets to a host and reports if they arrive. Tests basic connectivity. | ping -c 4 google.com |
| ip addr | Shows IP addresses assigned to all network interfaces. | ip addr show enp3s0 |
| ip route | Shows the routing table — how traffic is directed to destinations including the default gateway. | ip route show |
| nmcli | NetworkManager CLI — manage connections, check status, connect to WiFi. | nmcli device status |
| ss | Shows open network sockets — which ports are listening and which connections are active. | ss -tuln |
| dig / nslookup | DNS lookup — resolves a hostname to an IP address. Tests DNS is working. | dig google.com |
| curl | Makes HTTP/HTTPS requests. Quick test for internet connectivity and web server responses. | curl -I https://google.com |
| traceroute | Shows the path packets take to reach a destination — identifies where a connection fails. | traceroute google.com |
A quick connectivity test sequence
6. Setting a Static IP Address
By default, your computer gets an IP address from your router via DHCP — the address can change each time you reconnect. For home servers, printers, or any device you want to reach by a fixed address, a static IP is useful.
Graphical method — NetworkManager
-
1Click the network icon in the system tray → click the gear icon next to your active connection, or open Settings → Network and click the gear next to your connection.
-
2Go to the IPv4 tab.
-
3Change the method from "Automatic (DHCP)" to "Manual".
-
4Enter your settings. Here's an example for a typical home network:
ip route | grep default to find it if unsure.-
5Click Apply, then disconnect and reconnect the network connection for the static IP to take effect.
Terminal method — nmcli
7. DNS Configuration
DNS (Domain Name System) translates hostnames like google.com into IP addresses.
On most desktop installations, NetworkManager handles DNS automatically using your router's
DNS server. You can override this with faster or more privacy-respecting public DNS servers.
Check current DNS servers
Popular public DNS servers
- Cloudflare —
1.1.1.1and1.0.0.1— fast, privacy-focused, no logging - Google —
8.8.8.8and8.8.4.4— very reliable, widely used - Quad9 —
9.9.9.9— blocks known malicious domains automatically
Set DNS via NetworkManager as shown in the static IP section above, or in the graphical IPv4 settings panel of your connection.
8. Troubleshooting Common Network Problems
8.8.8.8 but not
google.com, the problem is DNS. Try ping 1.1.1.1 — if that works
too, set a manual DNS server via NetworkManager (1.1.1.1 or 8.8.8.8). Restart the connection
after changing DNS. If 8.8.8.8 also fails, the problem is upstream of your machine —
check your router.
sudo iwconfig wlp2s0 power offTo make this permanent, create
/etc/NetworkManager/conf.d/wifi-powersave-off.conf
containing:
[connection]wifi.powersave = 2Then restart NetworkManager:
sudo systemctl restart NetworkManager.
ip link show — if no wl interface appears,
the driver isn't loaded. Run lspci | grep -i wireless or
lsusb | grep -i wireless to identify the chip. Search for "[chip name] Linux driver" —
Broadcom and some Realtek chips require proprietary packages.2. Try the Ubuntu/Mint Additional Drivers tool (Chapter 6). It detects and installs Broadcom drivers automatically if connected via Ethernet.
ip link show — the Ethernet interface should show UP
and LOWER_UP when a cable is connected. If it shows DOWN, the cable
or port may be faulty — try a different cable and port.If
UP but no IP address: sudo dhclient enp3s0 forces a new DHCP
request. If that fails, check your router's DHCP server is enabled.
nmcli connection delete "NetworkName".
Then reconnect as if for the first time and re-enter the password carefully — pay attention
to case sensitivity.
sudo systemctl start NetworkManager
sudo systemctl enable NetworkManager
If it fails to start, check the logs:
sudo journalctl -u NetworkManager -n 50.
On server distros that use Netplan/networkd instead, NetworkManager may be intentionally absent.
Chapter Summary
| Topic | Key points |
|---|---|
| NetworkManager | Manages all connections on desktop Linux. Handles DHCP, saves WiFi passwords, creates VPNs. Configured via GUI tray icon or nmcli in terminal. |
| Ethernet | Auto-connects on cable insertion. Check with ip link show (interface should be UP) and ip addr show (should have an inet address). |
| WiFi (GUI) | Click network tray icon → select network → enter password. NetworkManager saves the password and reconnects automatically. |
| WiFi (terminal) | nmcli device wifi list to scan, nmcli device wifi connect "Name" password "pass" to connect. |
| Connectivity test | Ping gateway → ping 8.8.8.8 → ping google.com. Failure at each step tells you which layer the problem is at. |
| Static IP | Set via NetworkManager GUI (IPv4 → Manual) or nmcli connection modify. Prefer router DHCP reservation for home use. |
| DNS | Managed automatically by NetworkManager. Override with 1.1.1.1 (Cloudflare), 8.8.8.8 (Google), or 9.9.9.9 (Quad9) for speed or privacy. |
| WiFi dropout fix | Disable power management: create /etc/NetworkManager/conf.d/wifi-powersave-off.conf with wifi.powersave = 2. |