Using the command line, how can I permanently disable network adapters?
I can disable the network adapters via GUI (see screenshot).
How can I do the same via command line (CLI)?
Is there a file I can edit?
Network.jpg
Thanks in advance,
Jake
Using the command line, how can I permanently disable network adapters?
I can disable the network adapters via GUI (see screenshot).
How can I do the same via command line (CLI)?
Is there a file I can edit?
Network.jpg
Thanks in advance,
Jake
sudo ifconfig eth0 down
will disable the primary Ethernet interface. Apply the same logic to any other interfaces you wish to disable.
If you want to permanently disable it so it doesn't come up at the next reboot, you'll have to "blacklist" the network driver in /etc/modprobe.d/. It's probably easier to add the ifconfig command (without the "sudo") to /etc/rc.local, the last script that runs when the machine boots.
Last edited by SeijiSensei; May 20th, 2015 at 04:55 PM.
If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.
Blog · Linode System Administration Guides · Android Apps for Ubuntu Users
I think I'm running into a problem adding to the rc.local. I'm guessing I have services running and using the network adapter, and then the rc.local shuts the adapter down. If this is true, I need the solution the disable the adapter before rc.local, init.d, etc.
I need something that will disable the adapter at the beginning.
I have two network adapters (eth0 and wlan0). I don't want to use wlan0 for anything.
Last edited by snakyjake; May 20th, 2015 at 11:41 PM.
Answer in post #2 (blacklist driver).
Wouldn't NOT connecting to any WiFi network and/or use an hardware switch (if available) or simply removing the card/USB you "don't want to use for anything" be a way simpler and effective solution?I have two network adapters (eth0 and wlan0). I don't want to use wlan0 for anything.
Galiza Nação!
Where's the setting to disable "Automatically connect to this netowork when it is available"?
I need this setting, and the adapter, disabled at boot before some services start. I don't want the services (apps) mapping my router to the wlan0 IP address.
Network2.jpg
Bookmarks