The stock answer for static IP addresses doesn't work for me, although it's listed on a half dozen different sites. I've only seen one that even indicated that one must sudo the edit in order to write to it.

However, my ifconfig shows an interface called enp0s31f6, which is NOT in etc/network/interfaces, so I don't see a way to edit it. It does show up in the GUI for Network Connections as Ethernet - Wired connection 1. But if it is changed from DHCP to static, save is grayed out until it is changed back to DHCP.

What gives? This is a vanilla 16.04 installation.

  • 1
    Can you list which inputs you have made in the network connection settings (and which fields you have left empty) after switching to Manual? You should fill atleast the 3 fields under "Addresses" before Save becomes available. – anx Jan 8 '17 at 5:53
  • I can't get to the machine right now. I'm remote, and the point of the static IP address was to allow remote access to it. When I get home, I'll take a look and see if I missed entering a field. – Comissar Jan 20 '17 at 4:22

It is "normal" to only have the loopback device lo in /etc/network/interfaces because NetworkManager deals with network settings in an Ubuntu desktop setup.

To see all of your NIC devices, including inactive ones, you can do : /sbin/ifconfig -a

or : inxi -SNxz (After installing inxi).

You should be able to add a static ip address in the interfaces file, e.g. :

auto lo
iface lo inet loopback
auto enp0s31f6
iface enp0s31f6 inet static
  • I don't understand. If that is "normal", then why do all the instructions say to edit this file rather than use Network Manager? It seems like there is more going on than what the instructions say. Regardless, HOW do I edit this file if it is read only? And how did enp0s31f6 get configured in the first place? If Network Manager (or whatever) is going to reconfigure it later, what is the point of entering a configuration in the interfaces file? Won't it be overwritten? BTW, I am not clear on the purpose of inxi or how to install it. – Comissar Jan 20 '17 at 4:19
  • The loopback device (lo) is essential for Linux to run. If loopback device is gone, lots of programs can behave problematic. Years ago there was no such thing as NetworkManager or Wicd or other GUI based network managers. I assume that the /etc/network/interfaces is still there to give users the chance to overrule NetworkManager settings (e.g. on a server, which has no GUI programs installed). Did you try : sudo apt-get install inxi ? And how did you edit the /etc/network/interfaces file ? Something like : sudo nano /etc/network/interfaces should normally work. – albert j Jan 21 '17 at 3:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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