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?
Asked
Active
Viewed 6,361 times
0
-
please edit your question to include the result of `lshw -c net` – Jeremy31 Dec 10 '15 at 00:18
1 Answers
4
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
Wilhelm Erasmus
- 718
- 5
- 24
-
1How 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 – willem.hill Dec 09 '15 at 23:34
-
-
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. – Wilhelm Erasmus Dec 09 '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](https://askubuntu.com/questions/168032). – Skippy le Grand Gourou Sep 09 '17 at 12:03
-
Note that in my case blocking `phy0` blocked *both* the internal wifi card and the USB dongle, though. – Skippy le Grand Gourou Sep 09 '17 at 12:39