Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 235 Bytes

wsl.md

File metadata and controls

17 lines (12 loc) · 235 Bytes

wsl

网络相关

获取主机 ip

ip route | grep default | awk '{print $3}'
# 或者
cat /etc/resolv.conf | grep nameserver | awk '{ print $2 }'

获取 wsl ip

hostname -I | awk '{print $1}'