Is there any way to enable a pre-configured Wi-Fi hotspot from a shell script/command line without going to Settings > Wi-Fi > (settings icon) > Turn On Wi-Fi Hotspot... > Turn On?

  • askubuntu.com/q/1146694/739431
    – PRATAP
    Aug 10, 2019 at 3:26
  • This answer has a script which does something very similar: It creates the AP interface and shows how to bring it up and down. Bringing an existing interface up and down should be as easy as ip link set INTERFACE up/down.
    – dessert
    Aug 10, 2019 at 10:06

1 Answer 1


Based on @PRATAP's answer:

nmcli connection up <SSID>

Where <SSID> is likely Hotspot (can check this by running nm-connection-editor or going to Settings > Wi-Fi > (settings icon) > Connect to Hidden Wi-Fi Network... > Connection).

nmcli connection up/down also works for normal (non-hotspot) networks.

  • 1
    Hotspot is not the device's SSID but the network's profile name.
    – Justech
    Apr 6, 2021 at 8:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.