How to disconnect from wireless connection manually using the command line without using network manager?
I don't want to use WICD or NetWork-Manager. What should I type to disconnect ?
EDIT: This one is different from the ones above, I want to disconnect. Another thing, I don't want use WICD
nor Network-Manager
. As a prove, the answer below is not the same as the answers provided in these questions.
You can take the wireless interface down using the command line.
Open a Terminal window, and enter:
ifconfig -a
You will get a list of all of the network interfaces. Your wireless will likely be called wlan0
, and you can corroborate this with the information listed, such as the SSID
, etc.
In Terminal enter:
sudo ifconfig wlan0 down
You will be asked for your password, in order for this command to be run with the permissions needed. (if you don't have the permissions, you will be warned so.) This assumes wlan0
was your wireless interface.
Enter again:
ifconfig -a
and you should see wlan0
(or your interface) has been labelled DOWN
.
To reverse this, enter:
sudo ifconfig wlan0 up