shayne / go-wsl2-host

Automatically update your Windows hosts file with the WSL2 VM IP address
1.65k stars 140 forks source link

can't write to hosts file #57

Closed zipoopiz closed 1 year ago

zipoopiz commented 3 years ago

running .\wsl2host.exe debug, I get the information below: image

Houinside commented 3 years ago

You should uncheck read-only about the hosts' property by right click.

giovannicandido commented 2 years ago

Same thing here, and unsetting the read-only in the folder doesn't change it

toriqo commented 1 year ago

run wsl2host as administrator (open the terminal as administrator)