Sometimes we are working on some Linux Servers on which some internal LAN IP is allocated and we want to know our public IP address which is recognizing us outside the world.

So how can we know about this and what we can initiate from our own system…?

We can directly ask our network admin guy. But there are also one other way to find it directly from Linux command line. Let’s see some of them.

[root@srv3 ~]# wget -q -O - checkip.dyndns.org
<html><head><title>Current IP Check</title></head><body>Current IP Address: 120.56.201.176</body></html>

[root@srv3 ~]# wget -q -O - checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//'
120.56.201.176

[root@srv3 ~]# curl -s checkip.dyndns.org
<html><head><title>Current IP Check</title></head><body>Current IP Address: 120.56.201.176</body></html>

[root@srv3 ~]# curl -s checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//'
120.56.201.176

We can also used any text browser that support Linux terminal like elinks for same

[root@srv3 ~]# elinks checkip.dyndns.org

Related Posts

Disable ipv6 on Ubuntu 20.04

Disable ipv6 on Ubuntu 20.04

How to get file list in Ubuntu package

How to get file list in Ubuntu package

Netspeed – Display Download/Upload Speed on Ubuntu 20.04

Netspeed – Display Download/Upload Speed on Ubuntu 20.04

How to Install MySQL Workbench on Ubuntu Linux

How to Install MySQL Workbench on Ubuntu Linux

Cockpit – Linux Powerful tool to Monitor and Administrate using Web console

Cockpit – Linux Powerful tool to Monitor and Administrate using Web console