Sai Karthik
Balancing the braces ...Easy Way to Know Your Public IP Address From Terminal
I have learn recently from my colleague about this new way to easily know your public IP Address
from your terminal. Requirements are curl
& jq
(optional).
The response in this format is quiet useful for scripting usecases.
The url responds with a json object which contains your location, ISP, IP address etc… (response data below is masked for obvious reasons)
|
|
Or Just add the below alias to your ~/.bashrc
to keep it handy
With jq
|
|
Without the need of jq
|
|