Setup and Configuration

How to Setup Wifi Ubuntu? Ubuntu Wireless Steps

Introduction If you have recently installed Ubuntu or switched from another operating system, one of the first things you will want to do is get online. Wireless connectivity is essential for downloading updates, installing software, and everyday browsing. Thi

HowToFixWiFi

Introduction

If you have recently installed Ubuntu or switched from another operating system, one of the first things you will want to do is get online. Wireless connectivity is essential for downloading updates, installing software, and everyday browsing. This guide explains How to Setup Wifi Ubuntu? in clear, practical steps so you can connect quickly and confidently, whether you prefer a graphical interface or the command line.

Ubuntu ships with powerful networking tools, and most modern laptops connect automatically once the correct drivers are available. However, hardware differences, missing firmware, hidden networks, and server editions can make the process less obvious. In the sections below, you will learn multiple reliable methods, troubleshooting strategies, and best practices for managing WiFi on Ubuntu systems.

Table of Contents

Understanding WiFi on Ubuntu

Before diving into How to Setup Wifi Ubuntu?, it helps to understand how Ubuntu handles wireless networking. Most desktop editions use NetworkManager, a service that manages both wired and wireless connections. NetworkManager detects available wireless interfaces, scans for access points, stores connection profiles, and automatically reconnects when possible.

On the backend, Ubuntu relies on kernel drivers and firmware. A wireless card may be supported by open-source drivers, proprietary drivers, or manufacturer-specific firmware. If the driver is missing or the firmware is not installed, the WiFi option may not appear in settings at all. This is common on some Broadcom and Realtek chipsets.

Ubuntu also supports multiple networking tools, including nmcli, nmtui, iw, and wpa_supplicant. For most users, NetworkManager is the recommended approach because it integrates with the desktop and handles complex scenarios such as VPNs, captive portals, and roaming.

Prerequisites Before You Begin

Preparing your system reduces frustration and makes the setup process smoother. Start by ensuring your Ubuntu installation is reasonably up to date and that you have administrative privileges.

  • Confirm your wireless adapter is enabled in BIOS or UEFI settings.
  • Check whether airplane mode is turned off in Ubuntu settings.
  • Ensure you know the WiFi network name (SSID) and password.
  • Have an Ethernet cable or USB tethering option available in case WiFi drivers are missing.
  • Verify your user account can run sudo commands.

You can check whether Ubuntu sees a wireless interface by opening a terminal and running:

ip link show

Look for an interface such as wlan0, wlp2s0, or similar. If no wireless interface appears, you may need to install drivers or firmware before continuing.

Method 1: Connect Using the GNOME GUI

The graphical method is the easiest option for desktop users. Ubuntu’s default GNOME desktop includes a quick settings menu and a full Settings application for managing WiFi.

Step-by-Step GUI Instructions

  1. Click the system menu in the top-right corner of the screen.
  2. Ensure WiFi is turned on. If it is off, toggle it on.
  3. Click the WiFi icon or choose Wi-Fi Settings.
  4. Wait for Ubuntu to scan for available networks.
  5. Select your network name from the list.
  6. Enter the password when prompted.
  7. Click Connect.
  8. Wait for the status to change to connected.

Once connected, Ubuntu usually remembers the network and reconnects automatically. You can verify connectivity by opening a browser or running:

ping -c 4 ubuntu.com

If the GUI does not show WiFi at all, the issue is likely driver or firmware related. In that case, use an Ethernet connection and proceed to the driver section later in this article.

Method 2: Connect Using Terminal Commands

Many users prefer the terminal because it is fast, scriptable, and works on minimal installations. NetworkManager’s command-line tool, nmcli, is ideal for this.

Using nmcli to Scan and Connect

First, check the status of your wireless device:

nmcli device status

Then list available WiFi networks:

nmcli device wifi list

To connect to a network, use:

nmcli device wifi connect "YourSSID" password "YourPassword"

Replace YourSSID with your network name and YourPassword with the actual password. If the connection succeeds, NetworkManager saves the profile automatically.

To verify the connection, run:

nmcli connection show --active

You can also check your IP address with:

ip addr show

If you need to disconnect, use:

nmcli device disconnect wlan0

Replace wlan0 with your actual interface name. This method is especially useful when troubleshooting GNOME settings or automating setup on multiple machines.

Method 3: Connect Using nmtui

nmtui is a text-based user interface for NetworkManager. It is helpful on servers, minimal desktops, or when you want a menu-driven experience without leaving the terminal.

  1. Open a terminal.
  2. Run nmtui.
  3. Select Activate a connection.
  4. Choose your WiFi network from the list.
  5. Enter the password if prompted.
  6. Select OK or Activate.
  7. Exit nmtui after connecting.

nmtui is intuitive and avoids memorizing long commands. It also allows you to edit connection profiles, set static IP addresses, and manage hostnames.

Setting Up WiFi on Ubuntu Server

Ubuntu Server does not include a desktop environment, so GUI methods are unavailable. However, NetworkManager or netplan can manage WiFi depending on your installation.

On newer Ubuntu Server versions, NetworkManager is often installed. You can use nmcli or nmtui as described above. If netplan is used instead, edit the netplan configuration file, typically located in /etc/netplan/.

A basic netplan WiFi configuration looks like this:

network:
  version: 2
  wifis:
    wlan0:
      dhcp4: true
      access-points:
        "YourSSID":
          password: "YourPassword"

Apply the configuration with:

sudo netplan apply

Be cautious when editing netplan files because incorrect indentation can cause network failures. Always back up configuration files before making changes.

Connecting to Hidden Networks

Hidden networks do not broadcast their SSID, so they will not appear in automatic scans. You can still connect by manually entering the network details.

Using the GUI:

  1. Open WiFi settings.
  2. Choose Connect to Hidden Network.
  3. Enter the SSID, security type, and password.
  4. Save and connect.

Using nmcli:

nmcli device wifi connect "HiddenSSID" password "YourPassword" hidden yes

Hidden networks offer minimal security through obscurity and are not recommended for sensitive environments. Still, Ubuntu supports them fully when needed.

Managing Saved Connections

After you learn How to Setup Wifi Ubuntu?, managing saved profiles helps keep your system organized and secure.

List saved connections:

nmcli connection show

Delete an old profile:

nmcli connection delete "OldNetwork"

Modify a connection, such as setting it to auto-connect:

nmcli connection modify "YourSSID" connection.autoconnect yes

You can also prioritize networks by adjusting connection priority. This is useful when multiple known networks are available and you want Ubuntu to prefer one over another.

Troubleshooting Common Issues

Even with good preparation, WiFi problems can occur. The following subsections address the most common causes.

Missing or Incorrect Drivers

If no wireless interface appears, check your hardware with:

lspci | grep -i network

For USB adapters, use:

lsusb

Ubuntu’s Software & Updates application includes an Additional Drivers tab where proprietary drivers can be installed. Many Broadcom cards require the bcmwl-kernel-source package.

You can also install firmware packages such as linux-firmware, which contains many wireless firmware files.

NetworkManager Not Running

If WiFi options are missing, NetworkManager may be stopped or disabled. Check its status:

systemctl status NetworkManager

Start and enable it with:

sudo systemctl start NetworkManager
sudo systemctl enable NetworkManager

WiFi Blocked by rfkill

Sometimes wireless is soft-blocked or hard-blocked. Check with:

rfkill list

Unblock WiFi with:

rfkill unblock wifi

Hard blocks usually require a physical switch or BIOS setting change.

Incorrect Password or Security Type

Double-check the password, especially case sensitivity. Also ensure the security type matches the router, such as WPA2 or WPA3. If a saved profile is corrupted, delete it and reconnect.

Comparison of WiFi Setup Methods

Different methods suit different users and environments. The table below compares the most common approaches.

Method Best For Advantages Limitations
GNOME GUI Desktop users Simple, visual, automatic scanning Requires desktop environment
nmcli Advanced users, scripts Fast, powerful, scriptable Requires command knowledge
nmtui Server and minimal installs Menu-driven, no GUI needed Less visual than GNOME
netplan Ubuntu Server Persistent configuration Sensitive to YAML formatting

Security Best Practices

When connecting to WiFi, security should be a priority. Use WPA2 or WPA3 whenever possible and avoid open networks for sensitive tasks.

  • Keep Ubuntu and firmware updated.
  • Use strong, unique WiFi passwords.
  • Disable auto-connect for untrusted networks.
  • Verify you are connecting to the correct SSID to avoid evil twin attacks.
  • Use a VPN on public WiFi.

NetworkManager stores passwords in system keyrings or root-protected files. Regularly review saved profiles and remove old networks you no longer use.

Tips and Best Practices

These practical tips can improve reliability and reduce future issues.

  • Restart NetworkManager after major network changes.
  • Use journalctl -u NetworkManager to inspect logs.
  • Keep a fallback Ethernet connection when testing drivers.
  • Document your network configuration for server setups.
  • Test connectivity with both DNS and IP addresses to isolate DNS issues.
  • Update router firmware periodically.

If WiFi works intermittently, check signal strength, channel congestion, and power-saving settings. Some adapters aggressively enter power-saving mode and disconnect.

Frequently Asked Questions

Why does Ubuntu not show any WiFi networks?

This usually indicates missing drivers, disabled wireless, airplane mode, or a hardware kill switch. Check rfkill, BIOS settings, and install additional drivers if needed.

Can I set up WiFi without an internet connection?

Yes, if drivers are already installed. However, missing firmware may require another connection method, such as USB tethering or Ethernet, to download packages.

How do I make WiFi connect automatically?

Use nmcli connection modify "SSID" connection.autoconnect yes or enable auto-connect in the GUI settings.

Is netplan required on Ubuntu Desktop?

No. Ubuntu Desktop typically uses NetworkManager. netplan is more common on Ubuntu Server or specialized deployments.

How can I forget a WiFi network?

Use nmcli connection delete "NetworkName" or remove it from the GUI settings.

Conclusion

Learning How to Setup Wifi Ubuntu? becomes straightforward once you understand the tools Ubuntu provides. Desktop users can rely on the GNOME interface, while terminal users benefit from nmcli and nmtui. Server administrators can use netplan or NetworkManager depending on their setup. By following the steps, troubleshooting tips, and security practices in this guide, you can establish a stable and secure wireless connection on Ubuntu. With a little practice, managing WiFi on Ubuntu becomes as easy as on any other operating system, giving you full control over your network environment.