Most of the time while handling client’s Linux machines I have to find out their external IP. On Linux box you can do this by using lynx command. First you need to install lynx on your machine.
To install lynx from apt,
apt-get install lynx
To install lynx from yum,
yum install lynx
Now just run following to find out external ip
/usr/bin/lynx --dump whatismyip.com | grep "Your IP Address Is" | cut -d ":" -f 2