Curl your IP Address from Mac Terminal command

October 31, 2012

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


Will output something like the following:

D-Hewards-MacBook-Pro:http dheward$ curl

Taking it a step further.

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

Copy this line in

alias myip="curl"

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]

About me

Hello! I'm David Heward, how are you going? I'm a Senior Devops/Build Engineer, specialising in AWS & Cloud Automation. Based in London. Strong 10+ year background in Software development. Have a read of my blog. Have a look at some of my working projects. Contact me at @davehewy or on Linkedin.