User Tools

Site Tools


ubuntu:networking:get_local_ip_address

This is an old revision of the document!


Ubuntu - Networking - 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/networking/get_local_ip_address.1610117432.txt.gz · Last modified: 2021/01/08 14:50 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki