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


Fri Dec 27 2019 13:19:35 GMT+0000 (UTC)

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

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