How would I discover my public IP address on the Linux and OS X Unix order line to use with my own slam shell content without utilizing outsider site? Is there order line choice which will show my dynamic IP address on a Ubuntu or Fedora Linux?
There are numerous approaches to discover your public IP address or wan (Wide Area Network) IP on a Linux or Unix-like working frameworks like FreeBSD, OpenBSD, NetBSD, Apple OS X, and others.
What is Public IP address
An IP is short for Internet Protocol. It is utilized to recognize PCs or cell phones on the Internet. Every gadget associated with the Internet has an IP address. IP address can be utilized to customize data.
To get Public IP address using terminal just execute the given command.
$ curl ifconfig.co
You should get output like this with your public IP address.
We have successfully executed curl ifconfig.co command to get public IP address on Ubuntu 18.04 server.