User Tools

Site Tools


ubuntu:network:get_local_ip_address

This is an old revision of the document!


Ubuntu - Network - Get local IP address

ip route get 1 | sed 's/^.*src \([^ ]*\).*$/\1/;q'

returns:

192.168.1.69

ip route get 1 | awk '{print $7}'

returns:

192.168.1.69
ubuntu/network/get_local_ip_address.1610117364.txt.gz ยท Last modified: 2021/01/08 14:49 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki