Score:0

Reset internet on Ubuntu server 20.04 LTS

cn flag

I converted a VirtualBox image (Ubuntu server 20.04 LTS without GUI) to QEMU image (sudo qemu-img convert -f vdi...). It is start and work, but its ethernet network does not. I can not update it etc. It does not matter, but it was bridged card (in VM) and in QEMU is NAT (yet).

I found a temporary solution:

sudo dhclient -r

sudo dhclient

After it internet work well, till the next boot. How can I fix the ethernet settings in the OS? There is a tool what ran during install?

Score:0
cn flag

You have to modify netplan config file. Replace ens3 by the name of the interface .

You have to execute the command ifconfig and you will get the interface name . Then change the interface name.

root@server:~# vi /etc/netplan/01-netcfg.yaml
# enable dhcp4 
network:
  version: 2
  renderer: networkd
  ethernets:
    ens3:
      dhcp4: yes

then you can do a netplan try to check if there is no syntax error then do a netplan apply

Imre avatar
cn flag
Thank you very mutch, you spare me an install of Ubuntu sever + MySQL. Let me some additions only for someone read this article. 1. ip address ifconfig did not show my 'ens3' adapter, ip adress did it (without ip address and in 'DOWN' state) 2. cd /etc/netplan 3. ls 4. sudo nano 00-installer-config.yaml 5. change 'enp0s3' adapter name in the 4. row to 'ens3' 6. save nano and close it 7. sudo netplan try 8. sudo netplan apply 9. and the internet working again (after boot also)
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.