0

I'm trying to reload /etc/network/intefaces file to remove the current ens160 interface, but nothing I've found seems to do the trick.

What command is needed on 18.04 to do that?

Munsta0
  • 21

2 Answers2

2

I found the root of my problem :

I wasn't using netplan. Since I upgraded from 16.04, it seems the upgrade didn't configure the relation between netplan and NetworkManager properly. This is probably caused by the hardcoded static ip I had added.

The solution I used is as follows :

  1. Using NetworkManager, create a wired connection to replicate the static ip I want.
  2. Remove all mentions of the hardcoded interface in the file /etc/network/interfaces
  3. Reboot ( I have yet to find how to skip this step, but whatever )
  4. Create the missing file /etc/netplan/01-network-manager-all.yaml
network:
  version: 2
  renderer: NetworkManager
  1. sudo nmcli con up 'Wired connection'
  2. I executed the command sudo netplan apply, but I'm not certain if it's required or not

From there on, I can modify my connection then just down and up it to apply my modifications.

Munsta0
  • 21
  • Installing 16.04, then configuring a static IP, and finally upgrading to 18.04 is a perfectly valid thing to do. If that causes breakage it's a bug. I happen to have a 14.04 system with static IPs that I probably soon will need to upgrade to 18.04. So I may have to come back to this issue myself in the not so distant future. – kasperd Jan 23 '19 at 13:16
0

Been busy myself with trouble and yesterday i remembered to see a similar question here which you may wish to read up on.

Why is my network interface named enp0s25 instead of eth0?

Maybe you can find your solution in that thread

Diet Bos
  • 327