Hello friends.
Welcome again to a new lesson of this course series.
In this lesson, we are going to see how to find your public IP address with the help of Linux command.
Okay, public IP address is really helpful for different purposes.
For example, suppose if you want to connect to your ubuntu server via SSH, then in that case you need
to know your public IP address.
Okay.
There are different reasons for which you need to know your public IP address.
So there are two commands with the help of which we can find our public IP address.
So when we type ifconfig command then we get an IP address okay.
As you can see here we get 10.0 .2.15.
This IP address is not public IP address.
This IP address is private IP address okay.
This IP address is not accessible outside this network.
So to know our public IP address we just need to type the command curl.
Then if config dot me and hit enter.
And here you can see this is our public IP address okay.
After this the next command is host.
With host command we can find the public IP address.
So for that just type host my IP dot open dns.com dot resolver three dot open dns.com and hit enter.
And here you can see we got the public IP address.
These are the two commands with the help of which we can find our public IP address.
So this is how you can find your public IP address with the help of these two commands.