3

I am running arch on a notebook, but I do not need the wireless connection. Nevertheless the adapter is continuously running, even if it is not necessary. Is it possible to disable it temporarily? And if yes, how?

4

Find the device name with the command ip link, set it to down mode with ip link set <device> down. The device is most likely named something like wlp3s0. If operation isn't permitted, perform the command with sudo.

  • Is it possible to reenable it again with ip link set <device> up? – arc_lupus Jan 20 '16 at 13:28
  • Yes, that is possible. – roxto Jan 20 '16 at 13:30
6

Use rfkill:

$ rfkill block all

This will disable all wireless adapters, WiFi, Bluetooth, NFC, GPS, whatever your computer has built in. If you only want to disable one specific adapter, find out its ID with

$ rfkill list
0: hci0: Bluetooth
    Soft blocked: yes
    Hard blocked: no
1: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no

In this example, the ID of the WiFi chip is 1. Block it with

rfkill block 1

To reenable this interface, use

rfkill unblock 1

To reenable all interfaces use

rfkill unblock all

You can also choose to e.g. only disable all WiFi adapters and leave the rest by replacing all with wifi. Here's the full list of usable types from man rfkill:

block index|type
    Disable  the  device  corresponding  to the given index.  type is one of "all",
    "wifi", "wlan", "bluetooth", "uwb", "ultrawideband", "wimax", "wwan", "gps",
    "fm" or "nfc".

If you don't have rfkill installed, install it with

# pacman -S rfkill

PS: I have no idea why rfkill works when run as an unprivileged user. On my Mint, it doesn't have a setuid or setgid bit.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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