Wifi Guide

How to Use Wifi in Ubuntu? Seamless Connection Guide

Introduction If you have recently switched to Ubuntu or installed it on a new machine, one of the first things you will want to do is get online. Wireless networking is essential for modern computing, and Ubuntu handles it remarkably well once you know where t

HowToFixWiFi

Introduction

If you have recently switched to Ubuntu or installed it on a new machine, one of the first things you will want to do is get online. Wireless networking is essential for modern computing, and Ubuntu handles it remarkably well once you know where to look. This guide on How to Use Wifi in Ubuntu? walks you through every step of connecting, troubleshooting, and optimizing your wireless experience on the popular Linux distribution.

Whether you are running Ubuntu on a laptop, desktop, or virtual machine, the process is mostly straightforward. However, depending on your hardware, driver situation, and Ubuntu version, you may encounter small hurdles. This article covers everything from the basic network menu to advanced command-line tools, driver installation, and common problem solving. By the end, you will have a clear, reliable understanding of how wireless networking works in Ubuntu and how to keep your connection stable.

Table of Contents

What Is WiFi in Ubuntu?

Ubuntu is a free, open-source Linux distribution based on Debian. It uses the Linux kernel’s networking stack, which includes support for a wide range of wireless hardware. When you ask How to Use Wifi in Ubuntu?, you are really asking how to interact with this stack through either graphical tools or terminal commands.

Ubuntu ships with a network management daemon called NetworkManager. This service runs in the background and handles scanning for networks, storing credentials, and switching between connections. The default desktop environment, GNOME, provides a top-panel menu that talks to NetworkManager, giving you a point-and-click way to join WiFi networks.

Under the hood, the Linux kernel uses wireless drivers and firmware. Most modern Intel, Realtek, Broadcom, and Atheros chipsets are supported out of the box. However, some proprietary drivers require manual installation, which we will cover later.

Checking Your WiFi Hardware

Before attempting to connect, it helps to verify that your system can see the wireless adapter. This step is especially important on older laptops or custom desktops where the card may not be recognized automatically.

Checking via Terminal

Open a terminal and run the following command to list network devices:

lspci | grep -i network

This shows PCI-based network adapters. For USB WiFi dongles, use:

lsusb

To check whether the kernel has loaded a driver for your WiFi card, run:

iwconfig

If you see an interface such as wlan0 or wlp2s0, your hardware is detected. If no wireless interface appears, you likely need a driver or firmware.

Checking RFKill Status

Ubuntu includes a tool called rfkill that manages wireless kill switches. Sometimes WiFi is disabled at the hardware level. Run:

rfkill list

If you see Soft blocked: yes or Hard blocked: yes, unblock it with:

sudo rfkill unblock wifi

This simple fix resolves many “WiFi not showing” issues.

Connecting to WiFi Using the GUI

The easiest way to answer How to Use Wifi in Ubuntu? is through the graphical interface. GNOME’s top bar contains a network icon that provides quick access.

Step-by-Step GUI Connection

  1. Click the network icon in the top-right corner of the screen.
  2. Select WiFi from the menu.
  3. Toggle WiFi on if it is off.
  4. Click Select Network to see available SSIDs.
  5. Choose your network name.
  6. Enter the password when prompted.
  7. Click Connect.

Ubuntu will remember the network and reconnect automatically in the future. A padlock icon indicates a secured network, while open networks show no lock.

Connecting to Hidden Networks

If your SSID is hidden, click Connect to Hidden Network in the WiFi menu, enter the network name and security type manually, then provide the password. This is common in corporate environments.

Connecting to WiFi Using the Command Line

Power users often prefer the terminal. NetworkManager provides the nmcli tool, which is powerful and scriptable. Learning this method deepens your understanding of How to Use Wifi in Ubuntu?.

Listing Available Networks

Run the following command to scan and display nearby networks:

nmcli dev wifi list

The output shows SSID, signal strength, security type, and channel. This is useful when the GUI is unresponsive or when you are working over SSH.

Connecting to a Network

To connect to a network named “MyHomeWiFi” with password “secret123”, use:

nmcli dev wifi connect "MyHomeWiFi" password "secret123"

If the connection succeeds, NetworkManager saves it and auto-connects later. For open networks, omit the password argument.

Disconnecting and Reconnecting

To disconnect, run:

nmcli dev disconnect wlan0

Replace wlan0 with your actual interface name. To reconnect to a saved network:

nmcli con up "MyHomeWiFi"

Managing Saved Networks

Over time, you accumulate saved WiFi profiles. Managing them keeps your system tidy and secure.

Listing Saved Profiles

Run:

nmcli connection show

This displays all saved wired and wireless connections along with their UUIDs and types.

Deleting a Saved Network

To remove a profile, use:

nmcli connection delete "OldNetwork"

This is helpful when you no longer trust a network or want to force a fresh connection.

Editing Connection Settings

You can modify properties such as auto-connect behavior:

nmcli connection modify "MyHomeWiFi" connection.autoconnect yes

This ensures Ubuntu reconnects automatically whenever the network is in range.

Installing and Managing WiFi Drivers

Driver issues are the most common stumbling block when learning How to Use Wifi in Ubuntu?. Most hardware works out of the box, but some chipsets require proprietary drivers.

Identifying Your Chipset

Use lspci -knn | grep Net -A3 to see which kernel driver is in use. If it says “Kernel driver in use: none,” you need to install one.

Using Additional Drivers Tool

Ubuntu includes a graphical tool called Software & Updates. Open it, go to the Additional Drivers tab, and let it scan. It will list proprietary drivers for your hardware. Select the recommended one and apply changes. A reboot is usually required.

Broadcom Specific Notes

Broadcom cards often need the broadcom-sta-dkms package. Install it with:

sudo apt install broadcom-sta-dkms

Then reboot. If the open-source b43 driver conflicts, blacklist it by adding blacklist b43 to /etc/modprobe.d/blacklist.conf.

Realtek Specific Notes

Some newer Realtek cards need firmware from the linux-firmware package. Ensure it is installed and updated:

sudo apt update && sudo apt install linux-firmware

Troubleshooting Common WiFi Issues

Even with good hardware, things go wrong. This section addresses frequent problems people face when figuring out How to Use Wifi in Ubuntu?.

WiFi Not Showing in Menu

First check rfkill. Then restart NetworkManager:

sudo systemctl restart NetworkManager

If that fails, check whether the interface is down:

ip link show

Bring it up with sudo ip link set wlan0 up.

Connected But No Internet

If you are connected but cannot browse, check DNS and routing. Run:

ping 8.8.8.8

If this works but ping google.com fails, DNS is the issue. Edit your connection and set DNS servers to 8.8.8.8 and 1.1.1.1.

Slow WiFi Speeds

Slow speeds can result from power management. Disable WiFi power saving by editing /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf and setting wifi.powersave = 2. Restart NetworkManager afterward.

Intermittent Disconnects

Intermittent drops often relate to driver bugs or aggressive roaming. Try locking to a specific BSSID or disabling IPv6 if your network does not support it.

Advanced WiFi Settings

Ubuntu allows fine-grained control over wireless behavior. These settings help power users get the most out of their connection.

Setting a Static IP Address

For servers or consistent LAN access, assign a static IP via the GUI or nmcli:

nmcli connection modify "MyHomeWiFi" ipv4.addresses 192.168.1.50/24 ipv4.gateway 192.168.1.1 ipv4.dns "8.8.8.8" ipv4.method manual

Then reactivate the connection.

Creating a WiFi Hotspot

Ubuntu can share its connection as a hotspot. In the WiFi menu, select Turn On WiFi Hotspot. You can configure the SSID and password in Settings under WiFi. This is useful for sharing a wired connection wirelessly.

Changing MAC Address

For privacy or network testing, you can spoof your MAC address. In connection settings, set the cloned MAC address. Alternatively, use macchanger from the terminal.

WiFi Security Best Practices

Security should never be an afterthought when considering How to Use Wifi in Ubuntu?. Follow these guidelines to protect your data.

  • Always connect to WPA2 or WPA3 networks. Avoid WEP and open networks.
  • Use a strong, unique password for your home WiFi.
  • Keep Ubuntu updated to receive security patches.
  • Disable WiFi when not in use on public networks.
  • Consider using a VPN on untrusted networks.
  • Turn off automatic connection to unknown networks.

Ubuntu’s NetworkManager supports WPA3 on recent versions, offering stronger encryption. Check your router’s settings to enable it.

Performance Tips and Optimization

Getting connected is only half the battle. Optimizing performance ensures a smooth experience.

  • Position your router centrally and avoid interference from microwaves and cordless phones.
  • Use the 5 GHz band when available for higher speeds and less congestion.
  • Update your kernel and firmware regularly for driver improvements.
  • Disable background services that consume bandwidth.
  • Use iwconfig to monitor signal quality and adjust antenna orientation.

For laptops, disabling power saving on WiFi can improve throughput at the cost of battery life. Choose based on your needs.

GUI vs Command Line Comparison

Both methods have their place. Here is a quick comparison to help you decide which to use.

Feature GUI Method Command Line (nmcli)
Ease of Use Very easy, point and click Moderate, requires commands
Speed Fast for basic tasks Fast once commands are known
Scripting Not possible Fully scriptable
Remote Access Requires desktop session Works over SSH
Advanced Settings Limited Extensive
Troubleshooting Basic Detailed diagnostics

Most users will rely on the GUI for daily use while keeping nmcli in their toolkit for troubleshooting and automation.

Frequently Asked Questions

Can I use WiFi on Ubuntu without installing drivers?

Yes, if your hardware is supported by the kernel’s built-in drivers. Most Intel and many Atheros cards work out of the box. Broadcom and some Realtek cards may need additional drivers.

Why does my WiFi keep disconnecting on Ubuntu?

Common causes include power management settings, driver bugs, or router incompatibility. Disable power saving, update firmware, and try a different kernel if the issue persists.

How do I forget a WiFi network in Ubuntu?

Use the GUI by going to Settings, WiFi, and clicking the gear icon next to the network, then choose Forget. Or use nmcli connection delete "NetworkName" in the terminal.

Is Ubuntu WiFi slower than Windows?

Not inherently. With proper drivers and settings, performance is comparable. Differences usually stem from driver maturity or power management defaults.

Can I connect to 5 GHz WiFi in Ubuntu?

Yes, if your hardware and router support it. Ubuntu handles both 2.4 GHz and 5 GHz bands. Select the 5 GHz SSID from the network list.

How do I check WiFi signal strength in Ubuntu?

Run nmcli dev wifi to see signal bars. For detailed info, use iwconfig or iw dev wlan0 link.

Conclusion

Learning How to Use Wifi in Ubuntu? is a straightforward process once you understand the tools available. Ubuntu’s NetworkManager provides both a friendly graphical interface and a powerful command-line tool in nmcli. Most hardware works out of the box, and when it does not, the Additional Drivers tool or a few terminal commands usually resolve the issue.

By following the steps in this guide, you can connect to networks, manage saved profiles, troubleshoot problems, optimize performance, and maintain strong security. Whether you are a beginner clicking through the GNOME menu or an advanced user scripting nmcli commands, Ubuntu offers a flexible and reliable wireless networking experience. Keep your system updated, use strong security practices, and enjoy seamless connectivity on your Linux machine.