Rfkill is a tool for enabling and disabling wireless devices. We use “rfkill list” command as below to check the list of available wireless devices on our machine. This command returns the devices and its index 0, 1, 2 as below, $ rfkill list 0: phy0: Wireless LAN Soft blocked: no Hard blocked: no 1: brcmwl-0: Wireless LAN Soft blocked: no Hard blocked: no 3: hci0: Bluetooth Soft blocked: no Hard blocked: no As seen above we have a WiFi, LAN and Bluetooth supported and ON in my laptop.
Technical Implementation Details
Now lets try turning ON & OFF these wireless devices using rfkill as, Turn OFF WiFi $ rfkill block wifi OR using “rfkill list” index, $ rfkill block 0 Turn ON WiFi $ rfkill unblock wifi OR using “rfkill list” index, $ rfkill unblock 0 You may check “man rfkill” to see more details. $ rfkill Usage: rfkill [options] command Options: --version show version (0.5-1ubuntu3 (Ubuntu)) Commands: help event list [IDENTIFIER] block IDENTIFIER unblock IDENTIFIER where IDENTIFIER is the index no. of an rfkill switch or one of: all wifi wlan bluetooth uwb ultrawideband wimax wwan gps fm nfc
Gotchas and Common Issues
Permission Verification - confirm execution permissions and path variables before invoking system binaries.
Version Compatibility - check software version release notes for deprecated flags or syntax changes.
Log Monitoring - inspect system logs (
journalctlor/var/log) to troubleshoot execution failures.
Following these steps ensures clean configuration, proper security boundaries, and reliable execution for enable and disable wireless / wifi from command line.
Comments and corrections