Curl your IP Address from Mac Terminal command

October 31, 2012   

Great little one liner for terminal to fetch your ip address quickly.

curl ifconfig.me

Will output something like the following:

D-Hewards-MacBook-Pro:http dheward$ curl ifconfig.me
86.162.230.119

Taking it a step further.

D-Hewards-MacBook-Pro:~ dheward$ mate ~/.bash_profile 

Copy this line in

alias myip="curl ifconfig.me"

Open a new terminal window and type myip

And wollah! A nice tidy little response.

[caption id="attachment_929" align="aligncenter" width="571"]Screenshot of get my ip bash alias Screenshot of get my ip bash alias[/caption]


blog comments powered by Disqus