0

I have two Wifi adapters connected to my desktop: a PCI express TP-Link adapter, which is crap, and a USB Netgear adapter. I don't feel like manually taking out the PCI-E adapter, so how can I set the USB one as the default, and disable the internal one?

1
  • please edit your question to include the result of lshw -c net
    – Jeremy31
    Dec 10 '15 at 0:18
3

You can use rfkill

First, do rfkill list This will show you the names of your interfaces. Then you can do rfkill block <adapterindex> and that interface will be blocked. You can unblock again with rfkill unblock <adapterindex>

For example, my rfkill list gives: my-lat wilhelm # rfkill list

0: dell-wifi: Wireless LAN
    Soft blocked: no
    Hard blocked: no
1: dell-bluetooth: Bluetooth
    Soft blocked: no
    Hard blocked: no

So I could run rfkill block 0 or rfkill block 1

You can add these commands to /etc/rc.local so they will be run on every boot.

For more information see man rfkill

5
  • How do I know which one is which? When I run rfkill list, I get this: 0: phy0: Wireless LAN Soft blocked: no Hard blocked: no 7: phy7: Wireless LAN Soft blocked: no Hard blocked: no Dec 9 '15 at 23:34
  • Sorry about the crappy formatting. Dec 9 '15 at 23:35
  • That's okay. for future reference you can enclose such things in `. You could try removing the USB dongle and running it again. The index shouldn't change. Dec 9 '15 at 23:36
  • @WilhelmErasmus This question being marked as duplicate and your answer not being on the linked question, please add your answer here. Sep 9 '17 at 12:03
  • Note that in my case blocking phy0 blocked both the internal wifi card and the USB dongle, though. Sep 9 '17 at 12:39

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