Monday, June 22, 2020

How to enable network on Ubuntu machine from terminal.

I just installed Ubuntu Server on my laptop using netboot. While installation i was connected with wireless connection. Once installation is done i was unable to get network. to work on server i need to stay connected to my server. 

But now my question was where is my network? 
How to enable network on Ubuntu machine from terminal?
What are my option to get network connectivity back?

It was really huge task for me, as i have worked on ubuntu machine long back. 

What i tried:

sudo systemctrl network-manager restart
nmcli
sudo ifup -a

None of these worked. Next i tried 

sudo netplan generate

And luckily it gave me error saying token is invalid in /etc/netplan/01-netcfg.yaml. 

So i understood problem is with configuration & the command i have to use is netplan.

Solution:

Just Updated the configuration with sudo vi /etc/netplan/01-netcfg.yaml.
and executed sudo netplan apply

yay!!!!!! am done. 

My network connection is back.