hndcrftd / wsl2ip2hosts Goto Github PK
View Code? Open in Web Editor NEWUpdates WSL2 IP and fqdn in Windows etc/hosts on WSL start
License: MIT License
Updates WSL2 IP and fqdn in Windows etc/hosts on WSL start
License: MIT License
Hi, thank you for your work.
How can I remove everything that the script does...I have pretty complex use-cases and this script does not write correctly the WSL /etc/hosts for in my machine.
I tried to re-run the installation to avoid it running every time i start the WSL but it always update my hosts files...
may you help me please?
Thanks @hndcrftd for the great utility.
However, I am unable to get it to work as the windows hosts file is not updated.
No error is produced on my system when running the install script
windowshost.local
is successfully added to /etc/hosts
but the hostname entered in the script is never added to windows hosts.
Output on my machine:
➜ cd ~;\
➜ curl -s https://raw.githubusercontent.com/hndcrftd/wsl2ip2hosts/master/install.sh > wsl2ip2hosts.install.sh;\
➜ chmod +x wsl2ip2hosts.install.sh;\
➜ sudo PATH="$PATH" ~/wsl2ip2hosts.install.sh
[sudo] password for rai:
Would you like to add your Windows IP to your WSL /etc/hosts? [y/n] (default: y) :y
Enter hostname for Windows (default: windowshost.local) :
Would you like to start httpd web server when WSL starts? [y/n] (default: y) :
For your WSL enter a hostname or multiple, separated by space
:wsl.local
Populating IPs, this will take a few seconds...
Installation completed. The following entries are now in effect:
172.17.80.1 windowshost.local
172.17.94.115 wsl.local
Hi, my first use it.but when I get the script to my wsl2 host.then use "sh XXXX.sh",nothing happeded
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.