7 points

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


dashboard

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

"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

>> Browse more code snippets

more_vert