# Wi-Fi is Connected but the Network is not Working on Linux

## 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

```bash
$ ping google.com
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1706007060076/f4f7491a-4060-4fdc-85fd-7c1234253f82.jpeg align="center")

This means that it is unable to locate the IP address of google.com so let us try by pinging google through its IP

```bash
$ ping 8.8.8.8
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1706007090081/e1b9b779-0d74-4c2c-b48a-9872cdb0fcbe.jpeg align="center")

This means your device's internet is working when IP is provided. To solve the issue let us run the following command

```bash
$ sudo nano /etc/resolv.conf
```

Add the following line and save the file.

```bash
nameserver 8.8.8.8
```

To exit from nano type `ctrl+x , y , enter`

Now, Let us again ping google.com

```bash
$ ping google.com
```

now it can get a response

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1706006795439/b136eb63-d86e-4a3c-802c-874a6b293f0b.jpeg align="center")

Now you have to run the command for update and upgrade. Finally, restart your system.

```bash
$ 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.
