Table of contents
Introduction
Recently, I got into a problem when I blocked an upgrade in the middle and went on to solve other problems shutting down the laptop. The next morning, when I tried to browse the internet was not working even though I was connected to my home wifi. I searched on my phone for the solution and found this one which worked for me.
So, This blog is about how I solved the internet problem in my Linux system.
Resolv.conf file
The resolv.conf file is located in the '/etc' folder in the Linux system, which configures hostname resolution. It is commonly used to manage the DNS requests on Linux systems.
Solution
Let us dive into the solution that made my system network work.
Let us first run the command to ping the web services
$ ping google.com
This means that it is unable to locate the IP address of google.com so let us try by pinging google through its IP
$ ping 8.8.8.8
This means your device's internet is working when IP is provided. To solve the issue let us run the following command
$ sudo nano /etc/resolv.conf
Add the following line and save the file.
nameserver 8.8.8.8
To exit from nano type ctrl+x , y , enter
Now, Let us again ping google.com
$ ping google.com
now it can get a response
Now you have to run the command for update and upgrade. Finally, restart your system.
$ sudo apt update
$ sudo apt full-upgrade -y
$ sudo reboot
By following every step, the problem is solved. The above-mentioned steps are the exact steps that I followed to solve my problem. Hope this is helpful for you.