I have deleted the yaml config file. Now, what could I do to restore back?
the yaml file resides in
cat /etc/netplan/
First, using the terminal command ifconfig
, find the relevant interface that you are trying to configure. It may be something like ens3 or enp3s0 or similar.
Now recreate the file:
sudo nano /etc/netplan/01-netcfg.yaml
Write the following:
network:
version: 2
renderer: networkd
ethernets:
enp3s0:
dhcp4: true
Of course, substitute the interface you found if not enp3s0.
Spacing and indentation are crucial and must be perfect. Proofread carefully twice. Save (Ctrl+o followed by Enter) and exit (Ctrl+x) the text editor.
Now apply the settings:
sudo netplan apply
You should be all set.