Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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 wlan0 con-name Hostspot autoconnect yes ssid Hostspot
nmcli con modify Hostspot 802-11-wireless.mode ap 802-11-wireless.band bg ipv4.method shared
nmcli con modify Hostspot wifi-sec.key-mgmt wpa-psk
nmcli con modify Hostspot wifi-sec.psk "veryveryhardpassword1234"
nmcli con up Hostspot

Note

If after reboot nmcli con up Hotspot doesn't work

Use this command instead to start Hotspot

UUID=$(grep uuid /etc/NetworkManager/system-connections/Hotspot | cut -d= -f2)
nmcli con up uuid $UUID
@mp3butcher

This comment has been minimized.

Copy link

commented Dec 10, 2017

very usefull

@roncapat

This comment has been minimized.

Copy link

commented Aug 9, 2018

Thanks! Flawless

@ansarid

This comment has been minimized.

Copy link

commented Sep 15, 2018

How would I enable DCHP leasing on this hotspot?

@ryan4volts

This comment has been minimized.

Copy link

commented Mar 11, 2019

FYI for everyone who reads things "Hostspot" is in original notes and "Hotspot" in the Note. Host vs Hot

@WallBreakerX

This comment has been minimized.

Copy link

commented Mar 27, 2019

Help a lot!

@muelli

This comment has been minimized.

Copy link

commented Jun 25, 2019

does this do IP forwarding automatically?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.