User Tools

Site Tools


ubuntu:network:get_local_ip_address

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
ubuntu:network:get_local_ip_address [2021/01/08 14:49] peterubuntu:network:get_local_ip_address [2021/01/08 14:50] (current) – removed peter
Line 1: Line 1:
-====== Ubuntu - Network - Get local IP address ====== 
  
-<code bash> 
-ip route get 1 | sed 's/^.*src \([^ ]*\).*$/\1/;q' 
-</code> 
- 
-returns: 
- 
-<code bash> 
-192.168.1.69 
-</code> 
- 
- 
----- 
- 
-<code bash> 
-ip route get 1 | awk '{print $7}' 
-</code> 
- 
-returns: 
- 
-<code bash> 
-192.168.1.69 
- 
-</code> 
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