I use Arch Linux and this is the command I usually use to disconnect from the Internet: sudo wpa_cli -i wlp2s0 -p /var/run/wpa_supplicant\ GROUP\=wheel/ terminate
. To connect again, I use: sudo wpa_supplicant -B -i wlp2s0 -c /etc/wpa_supplicant-wlp2s0.conf
. That works at my home, but not here at my cousin's house.
I establish some kind of connection since I at least get Wi-Fi's name (iwgetid
returns the correct name of wlan). But that's all, there is no connection with the Internet.
I even tried running sudo dhcpcd -b
after sudo wpa_supplicant -B -i wlp2s0 -c /etc/wpa_supplicant-wlp2s0.conf
but it has no effect.
wpa_supplicant
it has a slightly different configuration than the first time it gets started automatically. Is there any reason you have to terminatewpa_supplicant
to disconnect? Why not use whatever way your distro uses (network manager, ifup/ifdown, disconnect withwpa_cli
, whatever?)