As far as I know, running ifconfig wlan0 down disables all communication via that wireless network interface. But what happens if I run rfkill block wifi afterwards? Does rfkill merely prevent the interface from going up again until I unblock it, or does it have an additional effect on the WLAN hardware?
1 Answer
Yes, rfkill has an additional effect on hardware: it physically (or rather electrically) disables WLAN, Bluetooth etc., so that it's impossible to send (or receive) anything on those frequences. Important e.g. on a plane where using such things is not allowed, or anywhere else where you must be sure to not produce noticeable EM waves. Also important on laptops when you want to conserve power.
If you just disable the interface, the firmware may still decide that it wants to use power to receive signals so it can update the internal state, or it may even send administrative signals from time to time.
- Thanks. The man page says that
ifconfigwill attempt to reset the interface in order to disable all transmission / reception. Is that insufficient, or different from whatrfkillwould do?Dmitry Grigoryev– Dmitry Grigoryev2017-08-16 11:35:57 +00:00Commented Aug 16, 2017 at 11:35 - It depends on the firmware. It should be sufficient, but I wouldn't bet on it. And yes, it's different from what
rfkilldoes, as I tried to explain in the answer. You can see the difference on laptops: withrfkill, the WLAN LED goes off (because it's disabled physically). Setting the interface to down doesn't affect the WLAN LED in any way.dirkt– dirkt2017-08-16 11:55:25 +00:00Commented Aug 16, 2017 at 11:55 - IMO on laptops the WLAN LED is not connected to actual WLAN adapter in any way. On USB WLAN adapters (at least the ones I have) the LEDs go down when I put the interface down.Dmitry Grigoryev– Dmitry Grigoryev2017-08-16 12:02:15 +00:00Commented Aug 16, 2017 at 12:02
- @DmitryGrigoryev: well, at least on my laptop the WLAN LED is connected to the circuitry that kills the complete interface. YMMV.dirkt– dirkt2017-08-16 12:13:17 +00:00Commented Aug 16, 2017 at 12:13
- May I ask which laptop that is?Dmitry Grigoryev– Dmitry Grigoryev2017-08-16 12:15:08 +00:00Commented Aug 16, 2017 at 12:15