rfkill Utility
rfkill is a tool to enable or disable connected wireless devices.
Let’s run rfkill list to display all the enabled Wi-Fi and Bluetooth devices on the system:
1
2
3
4
5
6
7
kali@kali:~$ sudo rfkill list
0: hci0: Bluetooth
Soft blocked: no
Hard blocked: no
1: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
“Soft blocked” refers to a block from rfkill, done in software. “Hard blocked” refers to a physical switch or BIOS parameter for the device. rfkill can only change soft blocks.
A radio can be disabled (soft blocked) using rfkill block followed by the device’s ID number that is displayed in the rfkill list command. Using the previous output, we will execute the rfkill command to disable our Wi-Fi device:
1
2
kali@kali:~$ sudo rfkill block 1
kali@kali:~$
We run rfkill list 1 to specifically list our disabled Wi-Fi device:
1
2
3
4
kali@kali:~$ sudo rfkill list 1
1: phy0: Wireless LAN
Soft blocked: yes
Hard blocked: no
To re-enable our Wi-Fi device we will run rfkill with the unblock parameter:
1
2
kali@kali:~$ sudo rfkill unblock 1
kali@kali:~$
We can disable all radios at the same time with the block all parameter:
1
2
kali@kali:~$ sudo rfkill block all
kali@kali:~$
And all the devices can be re-enabled using rfkill with the unblock all parameter.