Commands to find Static IP address of the server
If you want to find the public IP address of the system. Run following commands.
If you want to find the public IP address of the system. Run following commands.
# wget -q -O - checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//'
If this is not working for you, try this.# curl -s checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//'
It does not show you the LAN IP address, it shows the IP address that you can access out side the LAN, if it is static. # curl ifconfig.me
One of these four should work for you.# lynx -dump ifconfig.me | grep 'IP Address'