Get the IP address of the desktop / windows host in WSL2

hostip=$(ipconfig.exe | grep 'vEthernet (WSL)' -A4 | cut -d":" -f 2 | tail -n1 | sed -e 's/\s*//g') 




Senior Web Developer — Entrepreneur —

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Why and how we made our react monorepo at Thinkific

Simple SCSS + Autoprefixer Setup

Frontend-Design Knowledge Sharing #11

11 Funny Excuses That Programmers Use Daily

Man hiding while sipping a beverage

15+ Reasons Why You Should Pick React For Your Web Development Project

JS Job Story[arr.push()]

Guess who: A chatbot for face detection and image blurring with pure Node JS

How to use Next.js to create a Static Site in the JAMstack era

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Philipp Scheit

Philipp Scheit

Senior Web Developer — Entrepreneur —

More from Medium

How to Dual Boot Windows 10 along with Windows 11

Windows 11 vs. Windows 10, Tested: Will the OS Upgrade Speed Up Your Current PC?

Introducing the Windows Subsystem for Linux! Plus: Learn How to Fix WSL Errors

BOOX V3.2 Firmware Changelog