Pages

Friday, April 12, 2013

Fild IP address associated with teh server

1)

/sbin/ifconfig | grep “inet addr” | awk -F: ‘{print $2}’ | awk ‘{print $1}’

2)

ip addr | awk ‘/inet / {sub(/\/.*/, “”, $2); print $2}’
To find the public IP address

3)

wget -qO- http://ipecho.net/plain
or
curl http://ipecho.net/plain

4)

curl ifconfig.me

No comments:

Post a Comment