Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I wish to disable my wireless networking because I have a wired network connection.

I am using ubuntu 12.04. In the menu at settings > network > wireless there is an option to press a switch which toggles on/off. If I press this button, my wireless will toggle off. However, it hasn't actually toggled off. I don't lose the wireless IP address. If I close the menu and open it again, the toggle is set back to "on".

I can disable my wired network just fine. My wireless network, however, will not stay off.

The user account is an Administrator.

share|improve this question
Perhaps your computer has a physical hardware switch that can disable wireless... many models have one. – Richard Feb 21 '14 at 2:55
You can turn your wifi off using sudo ifconfig wlan0 down – g_p Feb 21 '14 at 3:02
Do you want to turn it off more or less permanently? – chili555 Feb 21 '14 at 3:22
Could you please run tail -f /var/log/syslog, then try again switch off wireless in gui network manager. Then print here logs, may be we can resolve this problem. – c0rp Feb 21 '14 at 4:21
up vote 2 down vote accepted

You can use rfkill to achieve that.


rfkill list all

to get the list of devices attached to your system. Note down the index for your wireless device and then do

rfkill block <index>

When you want to switch it on again, you can use

rfkill unblock <index>

If you are concerned that the index might change, you can use just specify it as 'wlan' instead of specifying it by index. Like,

 rfkill block wlan
 rfkill unblock wlan
share|improve this answer
Is this a permanent solution? I don't want to have to shut it off every time the computer boots. – melchoir55 Feb 26 '14 at 7:12
@melchoir55: If you need the blocking to be permanent, you can add rfkill block <index> to your /etc/rc.local – gTux Feb 26 '14 at 10:20
I tried adding "rfkill unblock 1" to the end of my rc.local file. The wireless device was index 1 per rfkill list all. When I rebooted I found that my wireless was still on. Further, it had changed from index 1 to index 0. The device on index 1 is now bluetooth. It is also still on. – melchoir55 Feb 27 '14 at 6:28
Sorry, fixed my file. The blocking does work, and after rebooting my wireless was index 1 again. I'm a little worried that the index might change and the wireless will no longer be disabled. Is there a way to prevent this? – melchoir55 Feb 27 '14 at 6:35
Sorry for the late update. I have edited my answer to address your query. – gTux Aug 19 '14 at 20:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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