Create a Wi-Fi hotspot from the terminal
Share your laptop's internet connection with phones using one nmcli command.
Run nmcli dev wifi hotspot ifname wlan0 ssid MyHotspot password 'pass12345' — phones can then join 'MyHotspot' like any network.
01Command
Command
$ nmcli dev wifi hotspot ifname wlan0 ssid MyHotspot password 'pass12345'02What it does
NetworkManager's hotspot mode turns your Wi-Fi card into a small access point and routes connected devices through your current internet connection — no hostapd config files needed. The connection is saved as a profile named Hotspot, so you can restart it later with nmcli con up Hotspot. Passwords should be at least 8 characters or devices will refuse to connect.
03Risk
!Warning: The hotspot shares whatever network you're on — hotel or captive-portal connections often won't share; if the card doesn't support AP mode the command fails with an error rather than degrading.
04Undo
Undo
$ nmcli connection delete Hotspot05Sources
- Software access point — Arch WikiEvidence: NetworkManager can create a Wi-Fi access point with nmcli device wifi hotspot, sharing an internet connection with other devices.
- nmcli(1) — Ubuntu manual pageEvidence: nmcli device wifi hotspot creates an access point connection with the given ssid and password and starts sharing the current internet connection.
Last verified: 2026-09-18 · Category: Network