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 — yaymemories.com

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

Recommended from Medium

Display Medium articles on your site.

FUNCTIONS AND ARRAYS

GameObject Extension

Benefits of React JS

Reactjs: useCallback and React.memo fun

Web development at Memo Bank

Cover image of the article.

How to get input from a checkbox (HTML/JS)

0.2. Empezando — 2.f Polkadot JS CLI

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 — yaymemories.com

More from Medium

TOP PROGRAMMING LANGUAGES THAT TECH EMPLOYEES ARE CRAZY ABOUT IN 2022

TOP PROGRAMMING LANGUAGES THAT TECH EMPLOYEES ARE CRAZY ABOUT IN 2022

The Worst Programming Habit

The Worst Programming Habit

Does programming scare you? You are not alone.