7 points

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


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

Posted 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_copy Copy

"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