Score:0

How to rename a network interface in 20.04 using netplan

in flag

My main ethernet interface is called eno1, but some software requires me to name it to eth0, as merc1er asked here. I coded the recommended yaml, did sudo netplan try and got nowhere. I followed other receipes like this one. No go!

This is the original 00-installer-config.yaml

network:
  ethernets:
    eno1:
      addresses:
      - 192.168.2.100/24
      gateway4: 192.168.2.1
      nameservers:
        addresses:
        - 192.168.2.1
        search: []

No point showing the many trials, because I didn't log the failures. The last variation I cobbled together makes sense to me but netplan can't tell me why or what is wrong:

00-my-installer-config.yaml

network:
  ethernets:
    eth0
      dhcp4: no
      addresses:
      - 192.168.2.100/24
      gateway4: 192.168.2.1
      nameservers:
        addresses:
        - 192.168.2.1
      match:
        macaddress: 34:17:eb:dc:77:2c
      set-name: eth0
  version: 2

Finally I rebooted with the original yaml. kitty manages to connect again but "hangs" after a while. Somehow the network got damaged. Is there a reset button to go back, ideally as far as eth0 ?

in flag
Meanwhile kitty / puTTY no longer "hangs". The `sudo systemctl status suspend.target` listed the unexpected and undesirable suspend activity, `sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target` got rid of it.
Terrance avatar
id flag
I deleted my answer because I actually do not like Netplan at all. I think it is unstable, but that is me. I use ifupdown instead. Sorry I cannot be much more help from here.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.