How to Connect to the Internet on Linux (Wired and Wireless Setup + Troubleshooting)

Published On: October 3, 2025
Follow Us
How to Connect to the Internet on Linux (Wired and Wireless Setup + Troubleshooting)

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 TypeDescription
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)

  1. Plug in your Ethernet cable
  2. Your system will usually connect automatically
  3. 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)

  1. Click on the network icon in the panel/tray
  2. Select your Wi-Fi network name (SSID)
  3. Enter your Wi-Fi password
  4. Click Connect

📷 Tip: Show screenshot of GNOME or KDE Wi-Fi selector for visuals (optional)

Common GUI Tools for Network:

Desktop EnvironmentNetwork Tool
GNOME (Ubuntu)Settings > Wi-Fi or top-right menu
KDE PlasmaNetworkManager Applet
XFCEnm-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

TaskCommand Example
Show network interfacesip a or ifconfig
Scan Wi-Fi networksnmcli device wifi list
Connect to Wi-Finmcli device wifi connect "SSID" password "PASS"
Ping a websiteping -c 4 google.com
Restart network managersudo systemctl restart NetworkManager
Show logsjournalctl -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.

sapan singh

👨‍💻 About Sapan Singh Hi, I’m Sapan Singh — a passionate software developer with a strong love for technology, gaming, and building useful digital tools.

Join WhatsApp

Join Now

Join Telegram

Join Now

Leave a Comment