1

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.

4
  • Perhaps your computer has a physical hardware switch that can disable wireless... many models have one.
    – Richard
    Feb 21, 2014 at 2:55
  • You can turn your wifi off using sudo ifconfig wlan0 down
    – g_p
    Feb 21, 2014 at 3:02
  • Do you want to turn it off more or less permanently?
    – chili555
    Feb 21, 2014 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, 2014 at 4:21

1 Answer 1

2

You can use rfkill to achieve that.

Do

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
5
  • Is this a permanent solution? I don't want to have to shut it off every time the computer boots.
    – melchoir55
    Feb 26, 2014 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, 2014 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, 2014 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, 2014 at 6:35
  • Sorry for the late update. I have edited my answer to address your query.
    – gtux
    Aug 19, 2014 at 20:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .