In almost any action I do in Windows Subsystem for Linux, I get a notification "How to resolve host name". Why would this happen in each fresh install and how to solve it?
Linux – Unable to resolve host name in WSL
windows-subsystem-for-linux
windows-subsystem-for-linux
In almost any action I do in Windows Subsystem for Linux, I get a notification "How to resolve host name". Why would this happen in each fresh install and how to solve it?
Best Answer
I don't know why it happens (please improve the answer with an explanation), here is a working solution for this problem:
1. Execute:
Type your machine name in capital letters ( it would be something like DESKTOP-SOMETHING). Delete anything besides your machine name.
Save and exit.
2. Then, execute:
Then, Make sure the file's first two rows looks as follows:
Save and exit.