Setup and Configuration

How to Connect Wifi in Linux Ubuntu? Ubuntu Wifi Steps

Introduction If you are new to Linux, one of the first practical questions you may ask is How to Connect Wifi in Linux Ubuntu? Ubuntu makes wireless networking much easier than it used to be, but the exact steps can still depend on your hardware, desktop envir

HowToFixWiFi

Introduction

If you are new to Linux, one of the first practical questions you may ask is How to Connect Wifi in Linux Ubuntu? Ubuntu makes wireless networking much easier than it used to be, but the exact steps can still depend on your hardware, desktop environment, and whether you prefer a graphical interface or the command line. This guide walks through every common method, from clicking a few settings to configuring Wi-Fi manually with terminal tools.

By the end, you will know how to scan for networks, connect securely, save credentials, troubleshoot missing adapters, and choose the best approach for your situation. Whether you are using Ubuntu on a laptop, desktop, virtual machine, or server, the steps below will help you get online with confidence.

Understanding Ubuntu Wi-Fi Support

Ubuntu handles wireless networking primarily through NetworkManager. This service manages Ethernet, Wi-Fi, VPN, and mobile broadband connections. Most desktop users interact with it through the system tray or Settings app, while advanced users can control it from the terminal.

Ubuntu supports a wide range of Wi-Fi adapters, including many Intel, MediaTek, Realtek, Qualcomm Atheros, and Broadcom devices. Some adapters work immediately because their drivers are included in the Linux kernel. Others require proprietary firmware or third-party drivers, especially certain Broadcom chips.

When asking How to Connect Wifi in Linux Ubuntu?, it helps to separate two ideas: detecting the adapter and connecting to a network. If your adapter is not detected, no connection method will work until the driver or firmware issue is resolved. If the adapter is detected but connection fails, the problem is usually credentials, signal strength, router settings, or NetworkManager configuration.

Before You Start: Requirements

Before connecting, confirm a few basics. You need an Ubuntu system, a Wi-Fi adapter, the network name (SSID), and the password if the network is secured. You also need permission to change network settings, which usually means being logged in as an administrator or having sudo access.

Check whether Ubuntu sees your wireless device by running:

ip link show

Look for an interface with a name such as wlan0, wlp2s0, or wlo1. Wireless interfaces often begin with wl. If you only see lo and an Ethernet interface, your Wi-Fi adapter may be disabled, missing, or unsupported.

You can also check the NetworkManager state:

nmcli general status

If NetworkManager is not running, many GUI and command-line methods will not work. On most Ubuntu desktops it starts automatically. On servers, you may need to install and enable it.

Method 1: Connect via the GNOME Settings

The easiest way for most users is the graphical interface. Ubuntu’s default desktop environment provides a simple Wi-Fi menu.

Steps for connecting through GNOME

  1. Click the network icon in the top-right corner of the screen.
  2. Select Wi-Fi if it is turned off, then enable it.
  3. Choose Select Network or open Settings > Wi-Fi.
  4. Wait for Ubuntu to scan and display available networks.
  5. Click your network name.
  6. Enter the password when prompted.
  7. Click Connect.

Once connected, Ubuntu remembers the network and reconnects automatically when it is in range. You can view connection details by opening Settings, selecting Wi-Fi, and clicking the gear icon next to the active network.

This method is ideal for beginners because it avoids terminal commands. It also handles most security types automatically, including WPA2 and WPA3.

Method 2: Connect Using nmcli

The nmcli command is the most powerful and reliable way to manage Wi-Fi from the terminal. It is included with NetworkManager on most Ubuntu systems.

List available Wi-Fi networks

nmcli device wifi list

This command shows SSIDs, signal strength, security type, and the active connection. If your network does not appear, wait a few seconds and run it again, or move closer to the router.

Connect to a network

nmcli device wifi connect "YourNetworkName" password "YourPassword"

Replace YourNetworkName with the SSID and YourPassword with the wireless password. If the SSID contains spaces, keep the quotation marks.

Rescan manually

nmcli device wifi rescan

After rescanning, run the list command again. This is useful when a network was recently turned on or when Ubuntu did not detect it during the first scan.

nmcli is excellent for servers, remote SSH sessions, and users who want repeatable commands. It also allows you to script connections and automate network setup.

Method 3: Connect with nmtui

If you want a terminal-based interface without remembering many commands, nmtui provides a text menu. It is often installed with NetworkManager.

nmtui

Use the arrow keys to navigate. Choose Activate a connection, select your Wi-Fi network, enter the password, and confirm. The interface is simple and works well on headless systems or when a graphical desktop is unavailable.

If nmtui is not installed, you can install it with:

sudo apt update
sudo apt install network-manager

Then run nmtui again.

Method 4: Configure Wi-Fi Manually with wpa_supplicant

For advanced users, wpa_supplicant provides direct control over wireless authentication. This method is less common on modern Ubuntu desktops but is useful on minimal systems, embedded devices, or custom network setups.

Create a configuration file

Generate a configuration using your SSID and password:

wpa_passphrase "YourNetworkName" "YourPassword" | sudo tee /etc/wpa_supplicant.conf

This creates a secure configuration file with your credentials. You may need to adjust file permissions depending on your system.

Start wpa_supplicant

sudo wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf

Replace wlan0 with your actual wireless interface name. The -B option runs it in the background.

Request an IP address

After authentication, request an IP address with DHCP:

sudo dhclient wlan0

This method requires more manual management. On most Ubuntu systems, NetworkManager is preferred because it handles scanning, DHCP, DNS, and reconnection automatically.

How to Find Available Networks

Before connecting, you often need to see which networks are available. Several commands can help.

Using NetworkManager:

nmcli device wifi list

Using the wireless tools package:

sudo iwlist wlan0 scan | grep ESSID

Replace wlan0 with your interface name. This command may require installing wireless-tools on some systems.

You can also inspect interface details:

iw dev

This shows wireless interfaces and their capabilities. It is especially helpful when troubleshooting adapter detection or when multiple wireless devices are present.

Connecting to Hidden Wi-Fi Networks

A hidden network does not broadcast its SSID. Ubuntu can still connect to it if you know the exact network name and security settings.

With nmcli, use:

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

In the GUI, choose Connect to Hidden Network, enter the SSID, select the security type, and provide the password. Make sure the SSID is typed exactly, including capitalization, because hidden networks are case-sensitive in practice.

Hidden networks do not provide strong security by themselves. A determined attacker can still discover the SSID. Use WPA2 or WPA3 with a strong password instead of relying only on hiding the network name.

Managing Saved Connections

Ubuntu saves Wi-Fi profiles so you do not need to enter credentials every time. You can manage these profiles with nmcli.

List saved connections:

nmcli connection show

Activate a saved connection:

nmcli connection up "YourNetworkName"

Deactivate it:

nmcli connection down "YourNetworkName"

Delete a saved profile:

nmcli connection delete "YourNetworkName"

This is useful when a network password changes or when you want to remove old profiles from a shared computer. In the GUI, you can also forget a network by opening Wi-Fi settings, selecting the network, and choosing the forget option.

Troubleshooting Common Ubuntu Wi-Fi Issues

Even when you know How to Connect Wifi in Linux Ubuntu?, hardware and configuration problems can prevent a successful connection. Start with simple checks before reinstalling drivers.

Wi-Fi is disabled

Check whether the adapter is blocked:

rfkill list

If Wi-Fi is soft-blocked, unblock it:

rfkill unblock wifi

Also check for a physical Wi-Fi switch on your laptop. Some machines have a hardware toggle or function-key combination that disables wireless.

Adapter is not detected

Inspect hardware and drivers:

lspci -k | grep -A 3 -i network
sudo lshw -C network

If no wireless device appears, the adapter may be disabled in BIOS/UEFI, unsupported, or physically disconnected. On virtual machines, ensure the VM has a wireless adapter or use bridged networking.

NetworkManager is not running

Restart the service:

sudo systemctl restart NetworkManager

Check its status:

systemctl status NetworkManager

If it is not installed, install it with:

sudo apt update
sudo apt install network-manager

Incorrect password or authentication failure

Ubuntu usually displays an authentication error when the password is wrong. Re-enter the password carefully, including uppercase letters and symbols. If the router was recently changed, delete the saved connection and reconnect.

Weak signal or frequent disconnects

Move closer to the router, reduce interference from microwaves or Bluetooth devices, and check whether the router supports the band your adapter is using. Switching between 2.4 GHz and 5 GHz can improve stability. In some cases, changing the router channel helps.

Updating Drivers and Firmware

Driver and firmware updates solve many Ubuntu Wi-Fi problems. Start by updating the system:

sudo apt update
sudo apt upgrade

Install common firmware packages:

sudo apt install linux-firmware

For Broadcom adapters, you may need proprietary drivers. Ubuntu’s Additional Drivers tool can install them:

sudo ubuntu-drivers autoinstall

You can also open Software & Updates > Additional Drivers in the GUI. After installing drivers, reboot the system so the new kernel module loads correctly.

If you are using a very new laptop, the default Ubuntu kernel may not yet support the Wi-Fi chip. Installing a newer kernel or using an Ubuntu LTS Hardware Enablement stack can help, but this should be done carefully.

Security and Best Practices

Connecting to Wi-Fi is only part of the task; keeping the connection secure matters too. Use these best practices:

  • Prefer WPA2 or WPA3 networks over open or WEP networks.
  • Use a long, unique password for your home router.
  • Keep Ubuntu updated to receive driver and security fixes.
  • Avoid entering passwords on untrusted public networks.
  • Use a VPN when connecting to public Wi-Fi.
  • Forget networks you no longer use to reduce automatic connections.
  • Verify the SSID before connecting, especially in public places where fake hotspots may exist.

These habits reduce the risk of credential theft, man-in-the-middle attacks, and accidental connections to rogue access points.

Comparison of Connection Methods

Different situations call for different tools. The table below compares the main methods for connecting Wi-Fi in Ubuntu.

Method Best For Ease of Use Key Advantage Limitation
GNOME Settings Beginners and desktop users Very easy Visual and intuitive Not ideal for remote or headless systems
nmcli Advanced users, servers, scripts Moderate Powerful and repeatable Requires learning commands
nmtui Terminal users wanting a menu Easy Simple text interface Fewer advanced options than nmcli
wpa_supplicant Minimal or custom systems Advanced Direct control over authentication Manual DHCP and management required

Frequently Asked Questions

Can I connect to Wi-Fi without using the terminal?

Yes. Ubuntu’s default GNOME desktop includes Wi-Fi settings in the system menu and Settings app. Most users can connect by selecting a network and entering the password.

Why does Ubuntu not show any Wi-Fi networks?

The adapter may be disabled, blocked by rfkill, missing firmware, or unsupported. Check ip link show, rfkill list, and driver information. Restarting NetworkManager can also help.

How do I connect Wi-Fi on Ubuntu Server?

Ubuntu Server often uses Netplan or NetworkManager depending on configuration. You can use nmcli or nmtui if NetworkManager is installed. Otherwise, configure Netplan or use wpa_supplicant manually.

Can Ubuntu connect to a hidden network?

Yes. Use the hidden network option in the GUI or run nmcli device wifi connect "SSID" password "password" hidden yes. The SSID must be typed exactly.

Why do Broadcom Wi-Fi adapters fail on Ubuntu?

Some Broadcom chips require proprietary drivers that are not included by default. Use Additional Drivers or sudo ubuntu-drivers autoinstall, then reboot.

Does Ubuntu remember Wi-Fi passwords?

Yes. NetworkManager saves connection profiles securely. It reconnects automatically when the network is available unless you choose to forget it.

Conclusion

Learning How to Connect Wifi in Linux Ubuntu? gives you flexibility whether you prefer a graphical desktop or a command-line workflow. For most users, GNOME Settings or nmcli provides the fastest and most reliable experience. For advanced setups, nmtui and wpa_supplicant offer additional control.

Start by confirming that Ubuntu detects your wireless adapter. Then use the method that best fits your environment, save the connection, and apply good security practices. If problems appear, check rfkill, NetworkManager, drivers, and firmware before assuming the network itself is at fault. With these steps, you can confidently connect and manage Wi-Fi on Ubuntu.