Skip to content

Instantly share code, notes, and snippets.

@guschnwg
Forked from narate/create-hotspot.md
Last active October 25, 2018 12:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guschnwg/098dd85bab341e48de618be7f5d4ce4d to your computer and use it in GitHub Desktop.
Save guschnwg/098dd85bab341e48de618be7f5d4ce4d to your computer and use it in GitHub Desktop.
Create Wi-Fi Hotspot on Linux using nmcli

Create a Wi-Fi hotspot on Linux using nmcli

Original post : https://unix.stackexchange.com/a/310699

nmcli con add type wifi ifname wlp2s0 con-name gustavo-eadbox autoconnect yes ssid gustavo-eadbox
nmcli con modify gustavo-eadbox 802-11-wireless.mode ap 802-11-wireless.band bg ipv4.method shared
nmcli con modify gustavo-eadbox wifi-sec.key-mgmt wpa-psk
nmcli con modify gustavo-eadbox wifi-sec.psk "gustavo-eadbox"
nmcli con up gustavo-eadbox

Note

If after reboot nmcli con up gustavo-eadbox doesn't work

Use this command instead to start Hotspot

UUID=$(grep uuid /etc/NetworkManager/system-connections/gustavo-eadbox | cut -d= -f2)
nmcli con up uuid $UUID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment