/etc/resolv.conf

# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:

# [network]

# generateResolvConf = false

has just one nameserver listed, and I can't reach ubuntu. What's to be done?

chatGPT says add:

nameserver 8.8.8.8

nameserver 8.8.4.4

I try that, and, when get back in - there's just the automatically generated nameserver entry.

If I try editing (even as sudo), I get "no such file or dir"

Luckily, chatG eventually delivers..

Step 1: Remove Existing Symlink or Stale Reference

Sometimes, /etc/resolv.conf in WSL is a symlink or dynamically managed file.

  1. Check if /etc/resolv.conf Exists as a Symlink:

    bash
    ls -l /etc/resolv.conf

    If it shows something like:

    javascript
    resolv.conf -> /run/resolvconf/resolv.conf

    You’ll need to remove it.

  2. Remove the File or Symlink:

    bash
    sudo rm /etc/resolv.conf

Comments

Popular posts from this blog

For Testing URLResource

Sorry, Can't Do This With Microsoft Outlook