Windows Subsytem on Linux, "sudo: can't resolve hostname"

0

1

I have just installed WSL and i am running into a number of issues. The first being that i can't change the locale to en_US with out using SUDO. When ever i use SUDO i get "sudo: can't resolve hostname". After som googling it was made clear to me that i would have to edit /ect/hosts and add my machine name. I tried this but apparently it can't be done with out SUDO. Any ides on how to solve this ?

Frederick M. Rogers

Posted 2016-08-05T08:59:03.577

Reputation: 101

Question was closed 2016-08-07T06:48:28.263

I haven't used WSL which is why I am just commenting. Can you login as root (su, then password when asked) and then perform the actions? It appears as though in older versions you were given a root prompt, so su to log in as root should work. – Brydon Gibson – 2016-08-05T15:19:03.870

@Brydon Gibson, I solved the problem by simple adding a reference to the name of my computer to the "Hosts" file. I am not sure why or how it works since since you need SU permission to make those changes. According to Microsoft if your windows user has administrative rights so will your linux user in WSL. Thanks for taking the time to look at my question. – Frederick M. Rogers – 2016-08-06T21:52:22.990

No answers