Table of Contents >> Show >> Hide
- Before You Start: 3 Things That Decide Whether This Works
- Method 1: The Quick GUI Hotspot (GNOME / KDE)
- Method 2: NetworkManager CLI Hotspot (nmcli) Fast, Clean, Scriptable
- Method 3: Hostapd + Dnsmasq (Most Control, Best for Servers)
- Can Linux Share Wi-Fi While Also Connected to Wi-Fi?
- Troubleshooting: Fix the 7 Most Common Hotspot Headaches
- 1) Hotspot doesn’t appear in the scan list
- 2) Devices connect but have no internet
- 3) “Connected, no IP address” on clients
- 4) Hotspot works, but DNS is broken (nothing resolves)
- 5) It’s slow (or randomly drops)
- 6) The hotspot comes up, but encryption is weird
- 7) “I want a dumb AP (bridge), not NAT”
- Security Checklist (Because “FreeHotspot123” Is a Cry for Help)
- Wrap-Up: Pick Your Hotspot Strategy
- Experience Notes: What Hotspot Setup Feels Like in the Real World (500+ Words)
Need Wi-Fi right now, but the router is across the hall (or across your entire life)? Linux can absolutely
turn a laptop, mini PC, or Raspberry Pi into a Wi-Fi hotspot. The trick is choosing the right method for
your setup: a quick GUI toggle, a clean nmcli command, or the “I run servers for fun” combo of
hostapd + dnsmasq.
This guide walks you through all three approaches, explains what’s happening under the hood (without putting
you to sleep), and includes troubleshooting for the classic “it connects… but nothing loads” situation.
Before You Start: 3 Things That Decide Whether This Works
1) Your Wi-Fi adapter must support Access Point mode
Some Wi-Fi cards can only join networks (client mode). To act like a router, your adapter needs “AP” support.
Check it with:
Look for a line that includes * AP. If you don’t see AP mode, you can still share internet via
Ethernet or USB tetheringbut you can’t broadcast Wi-Fi from that adapter. (In that case, a cheap USB Wi-Fi
dongle that supports AP mode is often the fastest fix.)
2) Decide: “Hotspot with sharing” vs “Dumb access point”
These sound similar but behave differently:
-
Hotspot with sharing (NAT): Your Linux box becomes a tiny router. Devices get private IP
addresses from your machine, and your machine translates traffic to the upstream connection. This is what
most people want for travel, emergencies, and “my hotel ethernet is lonely.” -
Dumb access point (bridge): Your Linux box simply extends an existing network so clients
get IP addresses from the upstream router. This is easiest when your upstream is Ethernet. Bridging Wi-Fi
to Wi-Fi can be tricky and hardware/driver dependent.
3) Know your upstream connection
Your hotspot can share internet from:
- Ethernet (most reliable)
- USB tethering (surprisingly stable)
- Cellular modem (great in the field)
- Wi-Fi (sometimes possible, sometimes a driver says “nope”)
If you’re hoping to connect to Wi-Fi and broadcast a hotspot using the same Wi-Fi adapter, it depends
on whether your hardware supports concurrent AP + client operation. Some can; many can’t. Don’t worrythis
guide covers workarounds.
Method 1: The Quick GUI Hotspot (GNOME / KDE)
If you’re on a desktop distro (Ubuntu, Fedora Workstation, Pop!_OS, etc.), this is the fastest path.
It’s also the method most likely to “just work” because NetworkManager handles the messy parts automatically.
GNOME (common on Ubuntu and Fedora)
- Open Settings → Wi-Fi.
- Open the menu (three dots or top-right menu, depending on version).
- Select Turn On Wi-Fi Hotspot….
- Set your network name (SSID) and password, then enable it.
Heads-up: GNOME will often ask you to disconnect from your current Wi-Fi first, because a single adapter may
only be able to create one network at a time.
KDE Plasma
KDE typically exposes hotspot options through the NetworkManager applet. You’ll usually find it via the
network icon in the system tray. Look for Hotspot or Create Hotspot, then
configure SSID/security and enable it.
If the GUI feels limited (or forgets your settings), you can still create the hotspot cleanly via the command
line with nmcliwhich leads us to the best all-purpose approach.
Method 2: NetworkManager CLI Hotspot (nmcli) Fast, Clean, Scriptable
nmcli is the command-line interface for NetworkManager. It can create a hotspot profile, enable
connection sharing, start a small DHCP/DNS service for clients, and set up NAToften with a single command.
Translation: you get to look like a wizard without memorizing 70 firewall rules.
Step A: Identify your Wi-Fi interface
Look for something like wlan0, wlp2s0, or wlp3s0 under the WIFI type.
Step B: Create and start the hotspot
Basic command (replace values with your own):
Password tips:
- Use 8–63 characters (typical WPA2 passphrase rules).
- Avoid short passwords unless you enjoy surprise neighbors.
- If you don’t provide a password,
nmclimay generate one (handy in a pinch).
Optional: Pick band and channel (when you want less congestion)
2.4 GHz travels farther; 5 GHz is often faster and less crowded. To specify band/channel:
If your hotspot fails to start after choosing a channel, your adapter or regulatory domain may not allow it.
Try a different channel, or omit the channel and let NetworkManager choose.
See the hotspot password later
If you forgot what you set (or let it auto-generate), try:
Or, if you know the connection profile name:
Stop the hotspot
First, list active connections:
Then bring the hotspot down (replace with your hotspot profile name):
What “shared” mode actually does (so you can troubleshoot intelligently)
When NetworkManager uses shared mode, it typically:
- Assigns your hotspot interface a private subnet (often
10.42.x.1/24by default) - Runs a lightweight DHCP server + DNS forwarding for connected devices
- Enables routing + NAT so clients can reach the internet through your machine
That’s why it can feel “magical.” And also why restarting firewall services mid-hotspot can sometimes break
connectivity: your hotspot depends on dynamic routing/firewall behavior.
Method 3: Hostapd + Dnsmasq (Most Control, Best for Servers)
If you’re building a permanent hotspot (lab, kiosk, travel router, IoT onboarding station), or you’re running
a headless Linux server without a desktop stack, this is the classic approach:
- hostapd = makes your Wi-Fi interface behave like an access point
- dnsmasq = gives clients IP addresses (DHCP) and (optionally) DNS
- nftables/iptables = does NAT so clients can reach the internet
Step A: Install packages
Examples (use your distro’s package manager):
Step B: Give the hotspot interface a static IP
Pick a private subnet for clients (example: 10.42.0.0/24). Assign the Wi-Fi interface
10.42.0.1. One simple (temporary) approach:
For a permanent setup, configure this through your distro’s network system (NetworkManager connection profile,
netplan, or systemd-networkd). If NetworkManager manages the interface and fights you, either create a dedicated
“AP” profile in NM or mark the interface unmanaged while hostapd is in control.
Step C: Configure hostapd
Create /etc/hostapd/hostapd.conf:
Notes that save time:
driver=nl80211is typical for modern Linux wireless stacks.hw_mode=gis 2.4 GHz; for many 5 GHz setups, you’ll usehw_mode=awith a valid channel.- If the service starts but the SSID doesn’t show up, try changing channel or removing fancy options to simplify.
Tell the service where the config file is (varies by distro). A common approach:
Step D: Configure dnsmasq (DHCP for clients)
Create a dedicated config like /etc/dnsmasq.d/hotspot.conf:
Make sure the DHCP range does not include your hotspot IP (10.42.0.1).
Step E: Enable IP forwarding (so traffic can route out)
Enable immediately:
Make it persistent (recommended):
Step F: Add NAT (so clients can reach the internet)
Choose your upstream interface (examples: eth0, enp3s0, usb0).
You can confirm with:
Option 1: nftables (modern)
Option 2: iptables (still common)
If your distro uses firewalld, you can also enable masquerading via firewalld instead of manual rules,
but the exact commands depend on your zone setup.
Step G: Start services
Check logs if anything acts suspicious:
Can Linux Share Wi-Fi While Also Connected to Wi-Fi?
Sometimes, yes. Often, no. Here’s the practical truth:
-
Many Wi-Fi adapters can either be a client or an access point at a time. Desktop environments may
even force you to disconnect from Wi-Fi before enabling a hotspot. -
Some chipsets/drivers support “concurrent” mode (AP + managed). If you have that, tools like NetworkManager
or dedicated hotspot apps may pull it off. -
The most reliable workaround is using two interfaces: keep Wi-Fi as upstream and use a USB
Wi-Fi dongle to broadcast the hotspot (or use Ethernet/USB tethering upstream).
Troubleshooting: Fix the 7 Most Common Hotspot Headaches
1) Hotspot doesn’t appear in the scan list
- Confirm AP support (
iw listshowsAP). - Try a different channel (some are blocked by region rules).
- Disable Wi-Fi power saving temporarily if your card is flaky.
- For hostapd, check
journalctl -u hostapdfor “channel not allowed” or driver errors.
2) Devices connect but have no internet
- Confirm the Linux box has internet on the upstream interface.
- Confirm clients received an IP (on the client device, check Wi-Fi details; on Linux, check
dnsmasqleases). - Make sure IP forwarding is enabled (
sysctl net.ipv4.ip_forwardshould be1). - Verify NAT rules exist (nftables/iptables) and point to the correct upstream interface.
3) “Connected, no IP address” on clients
- DHCP isn’t running (or is blocked). If using hostapd + dnsmasq, confirm dnsmasq is bound to the AP interface.
- Make sure another DHCP server isn’t fighting on the same interface.
- Try changing your subnet (e.g., from
10.42.0.0/24to192.168.50.0/24) if there’s an IP conflict.
4) Hotspot works, but DNS is broken (nothing resolves)
- Test by browsing to an IP address (e.g.,
1.1.1.1). If that works, DNS is the issue. - Set dnsmasq to forward to known resolvers or pass upstream DNS via DHCP options.
- On NetworkManager shared mode, restarting firewalls can sometimes disrupt the DNS/NAT chaintoggle the hotspot off/on.
5) It’s slow (or randomly drops)
- Try 5 GHz if supported; otherwise pick a less crowded 2.4 GHz channel (1, 6, or 11 are common choices).
- Move away from USB 3.0 interference (yes, that’s a real thing with some dongles).
- Update firmware packages for your Wi-Fi chipset (especially on Fedora/Arch).
6) The hotspot comes up, but encryption is weird
- For hostapd, prefer WPA2 (or WPA3 if you know your client devices support it).
- Avoid legacy WEP. It’s not “vintage,” it’s just weak.
- Use a normal-length passphrase (8–63 characters) to avoid compatibility issues.
7) “I want a dumb AP (bridge), not NAT”
If your upstream is Ethernet, bridging is straightforward: create a bridge interface (e.g., br0)
and attach the Ethernet + AP side appropriately. If your upstream is Wi-Fi, bridging can require 4-address/WDS-like
support and may not be reliable. In many real homes/offices, NAT hotspot sharing is the practical solution.
Security Checklist (Because “FreeHotspot123” Is a Cry for Help)
- Use WPA2/WPA3 with a strong passphrase.
- Don’t reuse important passwords (treat hotspot passwords like disposable cups).
- Keep it temporary if you’re on untrusted networks: turn off the hotspot when done.
- Consider client isolation if your AP supports it, especially in shared environments.
- Only share networks you’re allowed to share (work policies and venue rules can apply).
Wrap-Up: Pick Your Hotspot Strategy
- Need it fast? Use the GNOME/KDE hotspot toggle.
- Need it repeatable? Use
nmcli(great for scripts and quick fixes). - Need total control? Use
hostapd+dnsmasq(best for servers and permanent installs).
Once you understand the moving partsAP mode, DHCP, IP forwarding, NAThotspots stop feeling like magic and start
feeling like a power tool. The fun kind. The kind with fewer missing fingers.
Experience Notes: What Hotspot Setup Feels Like in the Real World (500+ Words)
In real life, setting up a Linux hotspot is rarely “hard,” but it’s often full of tiny surpriseslike assembling
furniture where the instructions are technically correct, yet you still end up holding one mysterious screw.
The most common experience people report is that NetworkManager-based hotspots feel effortless on laptops with
mainstream Intel hardware: flip the toggle (or run one nmcli command), the SSID appears immediately, phones connect,
and everyone suddenly believes Linux is “actually pretty convenient.” That’s the best-case scenarioand it happens
a lot more than it used to.
The second most common experience is the classic “connects but no internet” moment. The Wi-Fi link works, the phone
shows a checkmark, but websites refuse to load. When users dig in, it’s almost always one of three things:
(1) the upstream interface changed names (so NAT points to the wrong device), (2) IP forwarding isn’t enabled
persistently and got reset by a reboot, or (3) DNS is misbehaving even though raw connectivity is fine.
A quick sanity test many admins use: try opening a site, then try pinging a public IP address. If IP works and
names don’t, you’ve found your culprit. That single diagnostic step saves an absurd amount of time.
Travel scenarios produce their own set of “fun.” A common story: someone is in a hotel with one paid Ethernet jack,
multiple devices, and a deadline. A Linux laptop with an Ethernet port becomes the hero: it shares internet over
a Wi-Fi hotspot, and suddenly the tablet, phone, and second laptop can all function. The weird twist is captive
portalsthose login pages hotels love. Users often find they must authenticate on the upstream connection first,
then start the hotspot. If the portal times out, everything downstream collapses like a Jenga tower.
In those environments, restarting the hotspot after re-authenticating is practically a ritual.
Raspberry Pi and mini-PC setups feel different: they’re more “appliance-like.” People building an IoT onboarding
hotspot (for smart plugs, sensors, or a demo kit) typically want a stable SSID, a known subnet, and predictable
DHCP behavior. That’s where hostapd + dnsmasq shines. The experience here is usually: the first boot works,
then the second boot fails because one service started before the interface was readyor NetworkManager decided to
be “helpful” and grabbed the Wi-Fi interface back. Once users learn to commit to one network manager (either NM
does the whole job, or hostapd does), the setup becomes rock solid.
The most emotionally confusing hotspot experience is “Wi-Fi sharing while connected to Wi-Fi.” People expect it to
work like a smartphone: one radio, two jobs. On Linux, whether this works depends heavily on chipset support and
driver capabilities. Some users get lucky with modern adapters; others discover their hardware can’t do concurrent
AP+client, so the hotspot option is disabled or forces a disconnect. The typical outcome is a practical workaround:
add a second interface. A small USB Wi-Fi dongle becomes the dedicated hotspot radio, and the internal card stays
connected upstream. It feels slightly ridiculous… until it works flawlessly for months.
Finally, there’s the “it’s working but slow” chapter. Real-world interference is brutalapartment buildings,
conference centers, and dense neighborhoods can choke 2.4 GHz. Users often report dramatic improvement by switching
to 5 GHz when available, or by choosing a cleaner channel. The experience lesson here is simple: the hotspot setup
might be correct, but RF conditions still decide your fate. When performance matters, treating channel selection
like a real tuning knob (not an afterthought) makes Linux hotspots feel less like a hack and more like a proper tool.
