ubuntu:network:get_local_ip_address
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
ubuntu:network:get_local_ip_address [2021/01/08 12:16] – peter | ubuntu: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 show default 0.0.0.0/0 | ||
- | </ | ||
- | |||
- | returns: | ||
- | |||
- | <code bash> | ||
- | default via 192.168.1.1 dev br0 proto static | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | <code bash> | ||
- | ip route get 1 | sed ' | ||
- | </ | ||
- | |||
- | returns: | ||
- | |||
- | <code bash> | ||
- | 192.168.1.69 | ||
- | </ | ||
- | |||
- | |||
- | ---- | ||
- | |||
- | <code bash> | ||
- | ip route get 1 | awk ' | ||
- | </ | ||
- | |||
- | returns: | ||
- | |||
- | <code bash> | ||
- | 192.168.1.69 | ||
- | |||
- | </ |
ubuntu/network/get_local_ip_address.1610108180.txt.gz · Last modified: 2021/01/08 12:16 by peter