Wifi Guide

How to Add Wifi in Ubuntu? Ubuntu Wifi Setup Steps

Introduction Connecting to a wireless network is one of the first things most people do after installing a new operating system. If you are new to Linux or have recently switched from Windows or macOS, you might be wondering How to Add Wifi in Ubuntu? The good

HowToFixWiFi

Introduction

Connecting to a wireless network is one of the first things most people do after installing a new operating system. If you are new to Linux or have recently switched from Windows or macOS, you might be wondering How to Add Wifi in Ubuntu? The good news is that Ubuntu makes it relatively straightforward to connect to Wi-Fi, whether you prefer using a graphical interface or the command line.

Ubuntu supports a wide range of wireless adapters out of the box, and its built-in Network Manager handles most connections automatically. However, there are situations where you may need to configure settings manually, install missing drivers, or troubleshoot connection issues. This guide walks you through every step of the Ubuntu Wi-Fi setup process, from basic connections to advanced configuration and troubleshooting. By the end, you will know exactly how to connect, manage, and optimize your wireless network on Ubuntu.

Table of Contents

Understanding Wi-Fi on Ubuntu

Before diving into the setup steps, it helps to understand how Ubuntu handles wireless networking. Ubuntu uses a service called Network Manager to detect, configure, and manage network connections. Network Manager runs in the background and provides both a graphical interface and command-line tools for controlling Wi-Fi, Ethernet, VPN, and mobile broadband connections.

When you boot into Ubuntu, Network Manager automatically scans for available wireless networks and attempts to reconnect to networks you have used before. If your wireless adapter is recognized and the correct driver is installed, you should see a list of nearby networks in the system menu. If the adapter is not detected, you may need to install additional drivers or firmware, which is covered later in this guide.

Ubuntu also supports alternative networking tools such as netplan, systemd-networkd, and wpa_supplicant. While these tools are powerful, Network Manager is the default and recommended option for most desktop users because it is easier to configure and integrates seamlessly with the Ubuntu desktop environment.

What You Need Before You Start

Setting up Wi-Fi on Ubuntu is usually quick, but having a few things ready can save time and prevent frustration.

Check Your Wireless Hardware

Most modern laptops and desktops with built-in Wi-Fi cards work with Ubuntu without any extra configuration. If you are using a USB Wi-Fi adapter, make sure it is plugged in securely. To verify that Ubuntu detects your wireless hardware, open a terminal and run:

lspci | grep -i network
lsusb | grep -i wireless

These commands list PCI and USB devices related to networking. If you see your wireless adapter in the output, Ubuntu recognizes the hardware.

Know Your Network Details

Have the following information ready before you begin:

  • Network name (SSID): The name of the Wi-Fi network you want to join.
  • Password: The security key or passphrase for the network.
  • Security type: Most home networks use WPA2 or WPA3, but some may use WPA, WEP, or no security at all.

Ensure Wi-Fi Is Enabled

Some laptops have a physical switch or a function key combination (such as Fn + F2) that disables the wireless radio. Make sure Wi-Fi is turned on at the hardware level before attempting to connect in Ubuntu.

How to Add Wifi in Ubuntu Using the Graphical Interface

The easiest way to answer the question of How to Add Wifi in Ubuntu? is to use the graphical interface. Ubuntu’s desktop environment provides a simple, point-and-click method for connecting to wireless networks. The exact steps vary slightly depending on whether you are using GNOME (the default desktop), KDE Plasma, or another environment, but the general process is similar.

Steps for Ubuntu with GNOME Desktop

  1. Open the system menu: Click the network icon in the top-right corner of the screen. This opens a panel showing Wi-Fi, Bluetooth, and power options.
  2. Enable Wi-Fi: If Wi-Fi is turned off, click the Wi-Fi toggle or select Wi-Fi Not Connected and then choose Select Network.
  3. Choose a network: A list of available wireless networks will appear. Click the name (SSID) of the network you want to join.
  4. Enter the password: If the network is secured, a dialog box will prompt you for the password. Type it carefully and click Connect.
  5. Confirm the connection: Once connected, the network icon in the top bar will change to indicate an active Wi-Fi connection. You can open a web browser to verify that you have internet access.

Using the Settings Application

You can also add a Wi-Fi network through the Settings app:

  1. Open Settings from the application menu or system tray.
  2. Select Wi-Fi from the left sidebar.
  3. Make sure the Wi-Fi switch at the top is turned on.
  4. Click the network you want to connect to, or click the menu icon next to visible networks to see more options.
  5. Enter the password when prompted and click Connect.

Accessing Advanced Network Options

If you need to configure advanced settings such as a static IP address, custom DNS servers, or proxy settings, click the gear icon next to the connected network in the Wi-Fi settings panel. This opens a detailed configuration window where you can adjust IPv4, IPv6, security, and identity settings.

How to Add Wifi in Ubuntu Using the Terminal

For users who prefer the command line, or for situations where the graphical interface is unavailable, Ubuntu provides powerful terminal tools for managing Wi-Fi. Learning How to Add Wifi in Ubuntu? via the terminal is especially useful on servers, minimal installations, or remote systems.

Connecting with nmcli (Network Manager CLI)

The nmcli command is the most common way to manage Wi-Fi from the terminal. Follow these steps:

  1. Check Wi-Fi status:
    nmcli radio wifi

    If the output is disabled, turn it on with:

    nmcli radio wifi on
  2. List available networks:
    nmcli device wifi list

    This displays nearby networks along with their signal strength, security type, and channel.

  3. Connect to a network:
    nmcli device wifi connect "YourNetworkName" password "YourPassword"

    Replace YourNetworkName and YourPassword with your actual network details. If the SSID or password contains spaces or special characters, keep them inside the quotation marks.

  4. Verify the connection:
    nmcli connection show --active

    You can also test internet connectivity with:

    ping -c 4 google.com

Connecting with nmtui (Text-Based Interface)

If you want a simpler terminal experience, nmtui provides a text-based user interface:

  1. Run nmtui in the terminal.
  2. Select Activate a connection.
  3. Choose your Wi-Fi network from the list.
  4. Enter the password when prompted.

This tool is helpful when you are working on a system without a full desktop environment but still want a guided setup process.

Connecting to a Hidden Wi-Fi Network

Some networks are configured not to broadcast their SSID. These hidden networks do not appear in the standard list of available networks, but you can still connect to them if you know the network name and password.

Connecting to a Hidden Network via the GUI

  1. Open the system menu and go to Wi-Fi Settings.
  2. Click the menu option for Connect to Hidden Network (this may appear as three dots or a separate button depending on your Ubuntu version).
  3. Enter the network name, select the security type, and type the password.
  4. Click Connect.

Connecting to a Hidden Network via the Terminal

Use the nmcli command with the hidden yes option:

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

This tells Network Manager to attempt a connection even if the SSID is not being broadcast.

Installing Wi-Fi Drivers on Ubuntu

If your wireless adapter is not working, the most common cause is a missing or incorrect driver. Understanding how to install drivers is an important part of learning How to Add Wifi in Ubuntu?, especially on laptops with Broadcom, Realtek, or other proprietary chipsets.

Check Your Current Driver Status

Run the following command to see detailed information about your network hardware and the driver in use:

lshw -C network

Look for the line that says configuration: driver=.... If no driver is listed, or if the wireless interface is marked as UNCLAIMED, you need to install a driver.

Install Drivers Using Additional Drivers

  1. Connect to the internet using an Ethernet cable or USB tethering if possible.
  2. Open Software & Updates from the application menu.
  3. Go to the Additional Drivers tab.
  4. Ubuntu will search for proprietary drivers available for your hardware.
  5. Select the recommended driver and click Apply Changes.
  6. Restart your computer after the installation completes.

Install Drivers via the Terminal

You can also search for and install drivers from the command line:

sudo ubuntu-drivers devices
sudo ubuntu-drivers autoinstall

The first command lists recommended drivers for your hardware. The second command automatically installs them. After installation, reboot your system to load the new driver.

Troubleshooting Common Wi-Fi Problems

Even after following the setup steps, you may encounter issues. Here are some common problems and how to fix them.

Wi-Fi Option Not Showing

  • Check that your wireless adapter is recognized with lspci or lsusb.
  • Make sure Wi-Fi is not blocked by the system. Run rfkill list all to check. If it is soft-blocked or hard-blocked, use rfkill unblock wifi or toggle the hardware switch.
  • Restart Network Manager with sudo systemctl restart NetworkManager.

Connected but No Internet Access

  • Verify your IP address with ip a. If you do not have a valid IP address, the router may not be assigning one via DHCP.
  • Check DNS settings. Try pinging a public IP address such as ping -c 4 8.8.8.8. If that works but domain names do not resolve, update your DNS configuration.
  • Restart your router and reconnect to the network.

Frequent Disconnections

  • Weak signal strength can cause drops. Move closer to the router or reduce interference from other devices.
  • Power management settings may be turning off the wireless adapter. Disable Wi-Fi power management by editing the configuration file for Network Manager or by running sudo iwconfig wlan0 power off (replace wlan0 with your interface name).
  • Update your system and drivers to ensure you have the latest fixes: sudo apt update && sudo apt upgrade.

Authentication or Wrong Password Errors

  • Double-check the password and ensure Caps Lock is not enabled.
  • Forget the network and reconnect. In the GUI, go to Wi-Fi settings, select the network, and choose Forget. In the terminal, run nmcli connection delete "NetworkName" and then reconnect.
  • Confirm that the router is using a supported security protocol. Some older adapters may have trouble with WPA3-only networks.

Managing Saved Wi-Fi Networks

Ubuntu remembers the networks you connect to, making it easy to reconnect automatically in the future. However, you may want to view, edit, or remove saved networks from time to time.

Managing Networks in the GUI

Open Settings, go to Wi-Fi, and click Known Networks or the list of saved connections. From there, you can:

  • View details about each saved network.
  • Forget networks you no longer use.
  • Adjust settings such as auto-connect behavior and network priority.

Managing Networks in the Terminal

Use these nmcli commands to manage saved connections:

# List all saved connections
nmcli connection show

# Delete a saved connection
nmcli connection delete "NetworkName"

# Modify a saved connection (example: disable auto-connect)
nmcli connection modify "NetworkName" connection.autoconnect no

Setting a Static IP Address for Wi-Fi

By default, Ubuntu uses DHCP to obtain an IP address automatically. In some cases, such as running a local server or ensuring consistent network access, you may want to assign a static IP address.

Setting a Static IP via the GUI

  1. Open Settings and go to Wi-Fi.
  2. Click the gear icon next to your connected network.
  3. Select the IPv4 tab.
  4. Change the method from Automatic (DHCP) to Manual.
  5. Enter the IP address, netmask, and gateway provided by your network administrator or router configuration.
  6. Add DNS servers if needed, then click Apply.
  7. Disconnect and reconnect to the network for the changes to take effect.

Setting a Static IP via the Terminal

You can configure a static IP using nmcli:

nmcli connection modify "NetworkName" ipv4.addresses 192.168.1.100/24
nmcli connection modify "NetworkName" ipv4.gateway 192.168.1.1
nmcli connection modify "NetworkName" ipv4.dns "8.8.8.8 8.8.4.4"
nmcli connection modify "NetworkName" ipv4.method manual
nmcli connection up "NetworkName"

Replace the IP address, gateway, and DNS values with those appropriate for your network.

Comparison of Wi-Fi Connection Methods in Ubuntu

Ubuntu offers several ways to connect to Wi-Fi. The table below compares the most common methods to help you choose the right one for your situation.

Method Best For Ease of Use Requires Desktop Environment Advanced Configuration
System Menu (GUI) Everyday desktop users Very easy Yes Limited
Settings Application Users who need detailed options Easy Yes Moderate
nmcli (Terminal) Advanced users, servers, scripting Moderate No Extensive
nmtui (Text UI) Minimal installations without a GUI Easy to moderate No Moderate
wpa_supplicant Low-level control and custom setups Difficult No Very extensive

Tips and Best Practices for Ubuntu Wi-Fi Setup

Once you know How to Add Wifi in Ubuntu?, a few best practices can help you maintain a stable and secure connection.

  • Keep your system updated: Regular updates often include driver improvements and security patches that can resolve Wi-Fi issues. Run sudo apt update && sudo apt upgrade periodically.
  • Use strong network security: Whenever possible, connect to networks that use WPA2 or WPA3 encryption. Avoid open networks unless you are using a trusted VPN.
  • Remove unused networks: Deleting old or unused saved networks reduces clutter and can prevent Ubuntu from automatically connecting to the wrong network.
  • Check for interference: If your connection is slow or unstable, try switching your router to a less congested channel or using the 5 GHz band if your adapter supports it.
  • Back up network configurations: If you rely on custom settings, consider exporting or documenting your Network Manager profiles so you can restore them after a reinstall or system upgrade.
  • Use Ethernet for driver installation: When troubleshooting missing Wi-Fi drivers, a wired connection or USB tethering can provide the internet access needed to download and install the correct packages.
  • Restart Network Manager when needed: Many minor connectivity issues can be resolved quickly by restarting the service with sudo systemctl restart NetworkManager.

Frequently Asked Questions

Why don’t I see a Wi-Fi option in Ubuntu?

This usually happens when the wireless adapter is not detected, the driver is missing, or Wi-Fi is disabled by a hardware switch or software block. Check rfkill list all, verify your hardware with lspci or lsusb, and install the appropriate drivers if needed.

Can I connect to Wi-Fi in Ubuntu without a password?

Yes. If the network is open (no security), you can select it from the list of available networks and connect without entering a password. Keep in mind that open networks are less secure, so avoid transmitting sensitive information on them.

How can I find the password for a saved Wi-Fi network?

In the graphical interface, open Wi-Fi settings, select the saved network, and look for an option to show the password (you may need to authenticate). In the terminal, you can view saved connection details with appropriate permissions by inspecting files in /etc/NetworkManager/system-connections/ or by using nmcli with the --show-secrets option.

Will a USB Wi-Fi adapter work with Ubuntu?

Many USB Wi-Fi adapters work well with Ubuntu, but compatibility depends on the chipset and driver support. Before purchasing an adapter, check whether its chipset is supported by the Linux kernel or has readily available drivers.

Why did my Wi-Fi stop working after an Ubuntu update?

System updates can sometimes introduce driver conflicts or kernel changes that affect wireless hardware. Try rebooting first. If the problem persists, check for additional driver updates, review recent changes, or boot into an earlier kernel version from the GRUB menu to confirm whether the update caused the issue.

Are the steps the same for all Ubuntu versions?

The general process is similar across recent Ubuntu releases, but menu names, icons, and default tools may vary slightly between versions and desktop environments. The terminal commands using nmcli and nmtui are consistent across most modern Ubuntu installations.

Conclusion

Learning How to Add Wifi in Ubuntu? is a fundamental skill that makes your Linux experience smoother and more productive. Whether you use the graphical interface for quick connections or the terminal for greater control, Ubuntu provides reliable tools for connecting to wireless networks, managing saved connections, and resolving common issues.

For most users, the process is as simple as selecting a network and entering a password. When problems arise, checking hardware detection, verifying drivers, and using built-in tools like Network Manager, nmcli, and rfkill can help you identify and fix the cause. With the steps, tips, and troubleshooting guidance in this article, you should be well equipped to set up and maintain a stable Wi-Fi connection on Ubuntu in almost any situation.