Earlier it was perfectly well able to connect to the Internet but all of a sudden, it stopped on a reboot. And, I noticed there was missing the "Wired" connection icon. So I dug in.
So my first instinct was to check the status of the Network Manager using
sudo systemctl status NetworkManagerbut it seemed fine.
So I tried restarting it:
sudo systemctl restart NetworkManager but that didn't help.
My second instinct was to see if the NIC was detected and its modules were loaded properly. So I tried
sudo lspci -nn | grep -i net. It made me confident to see that the modules were properly loaded.
Then, I tried:
sudo lshw -C network. And, there is the problem. It seems the network card is down.
So I then identified the network interface that is
ens160 using the
Then, I ran these commands in order:
sudo ifconfig ens160 upsudo dhclient ens160sudo nmcli networking offsudo nmcli networking on
That's all. It worked!!