Ifconfig does not display network interfaces on Ubuntu 16.04 on VirtualBox
8,982
You can disable the use of PredictableNetwork and return to guessing the order of eth adapters by using
ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules
This page details how and why these names are used https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
Related videos on Youtube
Author by
encodeflush
Updated on September 18, 2022Comments
-
encodeflush over 1 year
I'm a facing a trouble in Ubuntu 16.04 desktop 64bit on VirtualBox where I can not find network interfaces by using
ifconfig
.$ ifconfig lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:160 errors:0 dropped:0 overruns:0 frame:0 TX packets:160 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1 RX bytes:11840 (11.8 KB) TX bytes:11840 (11.8 KB)
But using
ifconfig -a
shows enp0s3 (NAT) and enp0s8 (host-only) network adapters. I've edited /etc/network/interfaces and renamed eth0 and eth1 to enp0s3 and enp0s8 which solved the issue.auto lo iface lo inet loopback allow-hotplug enp0s3 iface enp0s3 inet dhcp allow-hotplug enp0s8 iface enp0s8 inet dhcp
However, in case I want to deploy the image some where else like VMware or KVM still I need to rename the adapters. How can I make it automatic?
-
Amias almost 8 yearsthe interfaces should come up automatically if you defined them in the vm settings , you might need to install the vmware guest tools
-
encodeflush almost 8 yearsFor other VMs (e.g., Ubuntu 14.04) it works fine but in this specific VM it fails.
-
Amias almost 8 yearswhat is the config for this vm ? and what differs from the working vm ?
-
encodeflush almost 8 yearsThey have identical config. Still I'm puzzled!
-