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
?
1 Answer
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
ip link set INTERFACE up/down
.