# shayne/go-wsl2-host

Automatically update your Windows hosts file with the WSL2 VM IP address

Repository: https://github.com/shayne/go-wsl2-host
Canonical: https://ross.abutalabs.com/products/go-wsl2-host
Language: Go
License Family: other
Topics: wsl, wsl2
Last push: 2024-08-10T07:39:40+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 2621, "days_push": 753, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1680, forks 137 (observed 2026-08-28T04:05:21.547673+00:00)

## What it is
A Go program that installs as a Windows service and automatically updates the Windows hosts file with the WSL2 VM's IP address. It maps distro names and custom aliases to the VM so the host can reach WSL2 via hostnames.

## Use cases
- access wsl2 vm from windows via hostname
- automatically update hosts file with wsl2 ip
- ping my wsl distro by name
- set up local domain aliases for wsl2 development
- fix wsl2 ip changing after restart
- run wsl2 hostname service on windows

## When to choose
- you develop on WSL2 and need stable hostname access from Windows
- you want automatic hosts file updates when the WSL2 VM IP changes
- you need custom local aliases pointing to your WSL2 VM

## When to avoid
- you use WSL1, which does not use a VM IP
- you need DNS for other machines on your network, not just the Windows host
- you require a maintained project with an explicit license

## Facets
- artifact type: cli-tool
- maturity: maintenance
- function: networking, configuration-management, developer-tools
- domain: developer-tools, windows
- platform: windows, cli
- tags: wsl2, hosts-file, windows-service, local-dns, go, automation

## Member repositories
- shayne/go-wsl2-host (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:21.547673+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:41:29.420393+00:00, confidence not recorded.
  - readme: https://github.com/shayne/go-wsl2-host (fetched 2026-08-28T04:05:21.547673+00:00, sha 56a69ba91838)
- Data as of 2026-08-30T08:39:29.467469+00:00.
