Created
February 13, 2020 20:38
-
-
Save narfel/9c84ffc15f84ebbbbf4370a61cf383e7 to your computer and use it in GitHub Desktop.
get ipv4 address cli ubuntu server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local: | |
hostname -I optional with | awk '{print $1}' | |
ip addr show (ip a) | |
ifconfig -a | |
ip route get 1.2.3.4 | awk '{print $7}' | |
nmcli -p device show | |
remote: | |
curl or wget -qO- <host> | |
hosts: | |
ifconfig.me | |
https://diagnostic.opendns.com/myip | |
http://checkip.amazonaws.com | |
ipinfo.io/ip | |
ident.me | |
icanhazip.com | |
ipecho.net/plain | |
bot.whatismyipaddress.com | |
api.ipify.org |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment