


paste the following lines in the file and exit saving it (Ctrl+X): You will need to restart you machine to make this change take effect. Save using Ctrl + x and press y and Enter to exit. Change the line webserverL to 127.0.0.1 webserverL. create a wsl.conf file in the root etc folder: sudo nano /etc/wsl.confģ. You dont have an address associated with your hostname, edit your /etc/hosts file as follows: Open using sudo nano /etc/hosts.

The nameserver address might differ in your caseĢ. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:> First, check the hostname of your system with hostname command.
SUDO UNABLE TO RESOLVE HOST BPC HOW TO
Let me show you how to fix this unable to resolve hostname error. Re: sudo: unable to resolve hostrun/resolvconf/nf will be newly created booting into WSL Ubuntu and has the following content: # This file was automatically generated by WSL. The root cause of the error was actually related to the hostname changing. You will need to log out / log in to SSH to have these changes take effect for your session. sudo sed -i /etc/hosts -e 's/127.0.0.1 localhost/127.0.0. This will automatically update the /etc/hostname file, however, if it doesn't you can always add the FQDN of your server into that file. Size: 29 Blocks: 0 IO Block: 4096 symbolic link If you're on Ubuntu Server it's more advisable to use sudo hostname. You should see a symbolic link pointing to: File: nf ->. check if there exists a nf symbolic link and file:.
