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?
Asked
Active
Viewed 2.6k times
6
casper.dcl
- 271
1 Answers
7
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.
casper.dcl
- 271
-
3
-
Where can I setup hotspot config without using GUI?
nm-connection-editorrequires GUI – gkucmierz Oct 23 '23 at 06:50 -
1
-
Thanks @AlexeyBurdin and
nmcli connection showshows a network with "Hotspot" in NAME column. Then thanks @Justechnmcli connection up Hotspotsucceed.nmcli connection up <SsidOfTheHotspot>failed with unknown connection error. – Weekend Jun 07 '24 at 03:22
ip link set INTERFACE up/down. – dessert Aug 10 '19 at 10:06