Connecting to the internet is one of the first steps after installing a Linux system. Thankfully, modern Linux distributions make it relatively easy — whether you’re on Wi-Fi or Ethernet. This guide will show you how to connect using both Graphical Interface (GUI) and the Command Line, and how to troubleshoot common connection problems.
Perfect for beginners, whether you’re on Ubuntu, Linux Mint, Fedora, or any mainstream distro.
📡 Types of Internet Connections in Linux
| Connection Type | Description |
|---|---|
| Wired (Ethernet) | Physical cable plugged into your computer or laptop |
| Wireless (Wi-Fi) | Connecting to a wireless router/network |
| Mobile (USB Tethering, Hotspot) | Using phone data via USB or Wi-Fi |
🖼️ GUI Method: How to Connect to the Internet (Most Distros)
Most desktop environments (like GNOME, KDE, XFCE) offer easy ways to manage internet connections using a graphical interface.
✅ Connect to a Wired Network (Ethernet)
- Plug in your Ethernet cable
- Your system will usually connect automatically
- Check for the connection icon in the system tray (usually top or bottom bar)
💡 If not connected:
- Go to Settings > Network
- Ensure the Wired connection is turned ON
✅ Connect to a Wireless Network (Wi-Fi)
- Click on the network icon in the panel/tray
- Select your Wi-Fi network name (SSID)
- Enter your Wi-Fi password
- Click Connect
📷 Tip: Show screenshot of GNOME or KDE Wi-Fi selector for visuals (optional)
Common GUI Tools for Network:
| Desktop Environment | Network Tool |
|---|---|
| GNOME (Ubuntu) | Settings > Wi-Fi or top-right menu |
| KDE Plasma | NetworkManager Applet |
| XFCE | nm-applet (network icon) |
| Cinnamon (Linux Mint) | Network Settings |
💻 Terminal Method: Connect Using Command Line
Useful for server setups, minimal installs, or troubleshooting without a GUI.
🔗 Check Network Interfaces
ip a
or
ifconfig # (may need `net-tools` installed)
✅ Connect to Ethernet (Wired)
Most distros will connect automatically to Ethernet. To check status:
ping -c 3 google.com
If that works, you’re online.
✅ Connect to Wi-Fi via Terminal
Step 1: List Available Wi-Fi Networks
nmcli device wifi list
Step 2: Connect to Wi-Fi
nmcli device wifi connect "NetworkName" password "YourPassword"
Replace "NetworkName" with your SSID and "YourPassword" with your Wi-Fi password.
Example:
nmcli device wifi connect "MyWiFi" password "mypassword123"
🧪 Test Your Internet Connection
Check if you’re online:
ping -c 4 google.com
Check your IP address:
ip a
🛠️ Common Networking Troubleshooting Steps
❌ Problem: “No Internet” or “Unreachable”
- Check if airplane mode is ON
- Restart your router
- Reboot your Linux system
- Try reconnecting to Wi-Fi
🔁 Restart the Network Service
sudo systemctl restart NetworkManager
Or on older systems:
sudo service network-manager restart
🔍 View Network Logs
journalctl -u NetworkManager
Useful to diagnose Wi-Fi authentication or driver issues.
📦 Install Missing Wi-Fi Drivers
Sometimes Wi-Fi doesn’t work out-of-the-box due to missing drivers (especially Broadcom chips).
On Ubuntu-based systems:
sudo apt update
sudo apt install bcmwl-kernel-source
Then reboot.
📄 Backup Tip: Create a Network Troubleshooting Script
Make a simple script to diagnose issues:
nano network-check.sh
Paste:
#!/bin/bash
echo "=== Checking Network Interfaces ==="
ip a
echo "=== Checking Connection to Google ==="
ping -c 3 google.com
echo "=== Listing Available Wi-Fi Networks ==="
nmcli device wifi list
Make it executable:
chmod +x network-check.sh
./network-check.sh
🧾 Quick Reference Commands
| Task | Command Example |
|---|---|
| Show network interfaces | ip a or ifconfig |
| Scan Wi-Fi networks | nmcli device wifi list |
| Connect to Wi-Fi | nmcli device wifi connect "SSID" password "PASS" |
| Ping a website | ping -c 4 google.com |
| Restart network manager | sudo systemctl restart NetworkManager |
| Show logs | journalctl -u NetworkManager |
✅ Conclusion
Getting online with Linux is usually straightforward — and if something doesn’t work, Linux gives you the tools to dig in and fix it. Whether you’re using a full desktop environment or just the terminal, you can stay connected with a few simple commands or clicks.
Once you’re connected, you’re ready to update your system, install software, and start exploring Linux even further.






