Wi-Fi Hotspot Setup with nmcli
INFO
Simple and easy guide to set up a Wi-Fi hotspot using nmcli on Linux.
Installation
Install this package:
shellsudo pacman -S dnsmasq
Quick Setup
Check your Wi-Fi interface name:
shellsudo nmcli device statusCreate the Wi-Fi hotspot:
shellsudo nmcli device wifi hotspot ifname wlan0 ssid MyHotspot password "MyStrongPassword"
INFO
- Replace
wlan0with your actual Wi-Fi interface name. - Replace
MyHotspotwith your desired SSID (Wi-Fi name). - Replace
"MyStrongPassword"with your chosen password.
Start the hotspot:
shellsudo nmcli connection up HotspotStop the hotspot:
shellsudo nmcli connection down HotspotDelete the hotspot (if you want to remove it):
shellsudo nmcli connection delete HotspotAlternatively using the UUID:
shellsudo nmcli connection delete uuid "UUID"
Viewing Hotspot Information
To view the password, use:
shell
nmcli device wifi show-passwordTo view which connections your device has and how the hotspot id is, use:
shell
sudo nmcli connection showTo view information about your active hotspot and its settings, use:
INFO
This will display details like the SSID, IP settings, WPA, and other parameters for your hotspot.
shell
sudo nmcli connection show HotspotListing Available Hotspots and Access Points
To view available Wi-Fi networks (including nearby hotspots you can connect to), run:
shell
nmcli device wifi list