0

I used command-line tool for controlling NetworkManager (nmcli) to "Turn On Wi-Fi Hotspot", like following:

# nmcli device wifi hotspot ssid X password X ifname wlan1
Device 'wlan1' successfully activated with 'a8168e88-e391-45b9-95e3-5b66fb10fd31'.
# 

Is there a way preserve this state somehow? Otherwise after restart I have to re-run same command again.

0

You need to add connection not to change device properties. Something like this:

nmcli connection add con-name WiFi type wifi ifname wlan1 ipv4.method auto autoconnect yes wifi.ssid X wifi-sec.psk Y. 

I don't have WiFi interface on machine I'm currently using so I cannot test it. Let me know if it worked for you.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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