Skip to main content

How to Connect to WiFi from Linux Ubuntu Server

· 7 min read
Jagdish Kumawat
Founder @ Dewiride

We will connect our Linux Ubuntu Server to WiFi using the inbuilt WiFi adapters available on the system. In my case, I have an old Dell laptop running Ubuntu Server 24.04, which has a built-in WiFi adapter. This guide will help you set up the connection step-by-step.

Prerequisites

  • Ubuntu Server installed (any recent version)
  • A compatible WiFi adapter
  • Access to the terminal (direct or SSH)
  • Network credentials (SSID and password)
  • Temporary Internet access to Linux Ubuntu Server either by LAN or USB tethering

Step 1: Check your network interfaces

Run this command to see if your Wi-Fi interface is detected:

ip link

Sample output:

1: 10: «LODPBACK, UP, LOHER UP> mtu 65596 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
Link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp7s0: <BRDADCAST, HULTICAST) mtu 1500 qdisc noop state DOHN mode DEFAULT group default qlen 1000 link/ether 20:47:47:3a:8d:af brd ff:ff:ff:ff:ff:ff
3: end66eBb268663: «BROADCAST, HULTICAST, UP, LOWER UP> mtu 1500 qdisc pfifo_fast state UNKNOHN mode DEFAULT group default qlen 1000 link/ether d6:6e:8b:26:86:63 brd ff:ff:ff:ff:ff:ff
4= docker®: «ND-CARRIER, BROADCAST, HULTICAST, UP> mtu 1500 qdisc noqueue state DOHN mode DEFAULT group default

When I ran the command, I noticed there wasn’t any wireless (Wi-Fi) interface like wlan0 or wlp* in the list—just lo, enp3s0 (Ethernet), and a couple of Docker interfaces showed up.

This usually means your Wi-Fi adapter isn’t being detected, or the right driver isn’t loaded yet.

Step 2: Check if your system detects any wireless hardware

Run this command to scan for wireless devices:

sudo lshw -C network

Sample output:

*-network
description: Network controller product: BCH43142 802.11b/g/n vendor: Broadcom Inc. and subsidiaries physical id: e
bus info: pci@0000:06:00.0
version: 01
width: 64 bits
Clock: 33HH2
capabilities: pm msi polexpress bus master cap_11st configuration: driver=bcma-pel-bridge latency=0
resources: irq:18 memory: f7900000-f7907fff
*-network DISABLED
description: Ethernet interface
product: RTLB10xE PCI Express Fast Ethernet controller vendor: Realtek Semiconductor Co., Ltd.
physical id: e bus info: pc10000:07:00.0 logical name: enp7se version: 07
serial: 26:47:47:3ละ8d:af
width: 64 bits
clock: 33HH2
capabilities: om msi pciexpress msix od bus master can Ilst ethernet physical
configuration: broadcast=yes driver=r8169 drLververslon=6.8.0-64-generic latency=@ Link=no multicast=yes resources: irq:19 loport:e000(s1ze=256) memory:f7880000-f7800fff memory:f2100000-f2103fff
*-network
description: Ethernet Interface physical id: b bus info: usb01:1,2
logical name: enxd66eBb268663
serial: d6:6e: 8b:26:86:63
capabilities: ethernet physical
configurat lon: autonegotiat lon=off broadcast=yes driversendis host driverversion=6.8.0-64-generic duplex=half firmare-RNDIS device ip=192.168.8.222 Link=yes
cast-yes port=twisted pair

My laptop has a Broadcom BCM43142 Wi-Fi card, but it’s not active — this model needs special drivers to work on Ubuntu.

Step 3: Install Broadcom wireless drivers

Make sure your system has a temporary Internet connection via LAN or USB tethering, etc. Then run:

sudo apt update && sudo apt install bcmwl-kernel-source

This installs the Broadcom proprietary driver needed for Wi-Fi card.

Step 4: Load the Wi-Fi driver

After installing the driver, load it into the kernel using:

sudo modprobe wl

This activates the Broadcom Wi-Fi driver we just installed.

Step 5: Check if the Wi-Fi interface is now available

Run this command again and look for a new interface like wlan0 or wlp* in the output:

ip link

Sample output:

1: 10: «LODPBACK,UP,LOHER UP> mtu 65536 qdisc noqueue state UNKNOHN mode DEFAULT group default qlen 1000
1ink/Loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp7s0: «BROADCAST, MULTICAST> mtu 1500 gdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether 20:47:47:3a:Bd:af brd ff:ff:ff:ff:ff:ff
4: docker®: <NO-CARRIER, BROADCAST,MULTICAST, UP> mtu 1500 qdisc noqueue state DOHN mode DEFAULT group default
1ink/ether 3e:d7:bb:67:43:15 brd ff:ff:ff:ff:ff:ff
6: enxd66eBb26B663: «BROADCAST, MULTICAST,UP, LOHER UP> mtu 1500 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default alen 1000
1ink/ether d6:6e:8b:26:86:63 brd ff:ff:ff:ff:ff:ff

But still, no luck—there’s no wireless interface (like wlan0 or wlp*) showing up, even after loading the wl module.

In my experience, this usually means the driver isn’t fully active. Often, Secure Boot is the culprit and blocks the driver from loading, even if your system claims “Secure Boot not enabled on this system.” (Yeah, sometimes that message isn’t totally reliable.)

Step 6: Check if the wl driver is active

Run this command. This checks if the wl driver is loaded into the kernel:

lsmod | grep wl

Sample Output

The output shows that the wl driver is loaded correctly.

Step 7: Bring up the wireless interface

Run this command to show all interfaces, even those that are down:

iw dev
note

If you get below output -

Command 'iw' not found, but can be installed with. Do it, Install the iw tool:

sudo apt install iw

You run iw dev again, and this time it gave no output, which means:
🛑 No wireless interface is currently active, even though the driver is loaded.

This can sometimes happen after installing Broadcom drivers — they need a reboot to fully activate the hardware.

Step 8: Reboot your system

Please run this to reboot:

sudo reboot

After reboot, log back in and then run this:

ip link

Sample Output

We see the wlp6s0, which confirms that WiFi interface is now active. You might see a different name depending on your system wifi card.

Step 9: Scan for available Wi-Fi networks

Run this command to see nearby Wi-Fi networks, This will list all visible Wi-Fi networks by their names (SSIDs):

sudo iw dev wlp6s0 scan | grep SSID
warning

If it fails and shows an error message that network is down. Run this command to turn on the wi-fi interface manually:

sudo ip link set wlp6s0 up

Then try scanning again:

sudo iw dev wlp6s0 scan | grep SSID

You should see your SSID now in the available networks.

Step 10: Connect to your Wi-Fi network

Let’s create a connection to Wi-Fi. Replace YOUR_SSID and YOUR_PASSWORD with your actual Wi-Fi name and password:

nmcli dev wifi connect "YOUR_SSID" password "YOUR_PASSWORD"

Example (don’t use this unless it’s your real Wi-Fi name/password):

nmcli dev wifi connect "HomeNetwork" password "mypassword123"
warning

If the above command says - command nmcli not found. Then install it using the below command:

sudo apt install network-manager

Once it’s installed, we’ll enable and use it to connect to Wi-Fi.

Your server is now successfully connected to your Wi-Fi network via wlp6s0.

Final Step: Verify your internet connection

Run this to confirm everything is working:

ping -c 4 google.com

If you see replies, you’re fully online.

Verify Connection


Stay Updated

Subscribe to our newsletter for the latest tutorials, tech insights, and developer news.

By subscribing, you agree to our privacy policy. Unsubscribe at any time.