Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable a VirtualBox network interface using a command-line?

When list virtual network interfaces, some of them are not anymore needed:

vboxnet1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether 0a:00:27:00:00:01 
vboxnet8: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether 0a:00:27:00:00:08 
vboxnet9: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether 0a:00:27:00:00:09 
vboxnet11: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether 0a:00:27:00:00:0b 
vboxnet12: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether 0a:00:27:00:00:0c 

How can I make them disable them for good?

like image 782
Thierry Marianne Avatar asked Jun 03 '14 21:06

Thierry Marianne


People also ask

How do I turn off network interface?

How to Disable a Network Interface. The “down” or “ifdown” flag with interface name (eth0) deactivates the specified network interface. For example, the “ifconfig eth0 down” or “ifdown eth0” command deactivates the eth0 interface if it is in an inactive state.

How do I disable the network adapter in Oracle VirtualBox?

Open VirtualBox Select the guest OS. Click on the Settings button. Go to Network Untick Enable Network Adapter Click on OK .

How do I disable the Ethernet adapter in VirtualBox host only network?

Show activity on this post. Open "Network connections" right click on the adapter you want delete and select properties. Under Networking -> click on configure. go to Driver tab on the popup and click on uninstall. This will remove it from the list.


1 Answers

It turns out VirtualBox comes natively with a special command dedicated to this need:

e.g. to remove the network interface vboxnet0, execute the following command

VBoxManage hostonlyif remove vboxnet0
like image 64
Thierry Marianne Avatar answered Oct 02 '22 04:10

Thierry Marianne