Useful snippet to easily access Ubuntu from Windows (in WSL2)

PHOTO EMBED

Fri Dec 27 2019 13:19:35 GMT+0000 (Coordinated Universal Time)

Saved by @swellcuban #commandline #interesting #windows #ubuntu #linux

ip addr | grep eth0 | grep inet | awk '{print $2}' | awk -F '/' '{print $1}' | awk '{printf "%s:3000", $0}' | clip.exe
content_copyCOPY

"I put it in a file I called copy_ip.sh, made it executable with chmod +x copy_ip.sh, and now whenever I want to access my server from Windows I can just ./copy_ip.sh and paste it into my browser" Better explained in the link

https://dev.to/codeluggage/today-i-wrote-a-handy-little-snippet-to-easily-access-ubuntu-from-windows-in-wsl2-19l