Headline News
GoPro Returns with New Range (September 26, 2016 7:31 pm)
TRAILER: Doctor Strange (April 13, 2016 8:23 am)
TRAILER: Dawn of Justice Trailer 2 (December 3, 2015 6:25 pm)
Luther Season 4 Returns to the BBC (December 2, 2015 9:13 pm)
Sherlock Special (December 2, 2015 9:01 pm)

A Guide to Linux: Check your external IP address

April 9, 2014

A quick and easy script to check your external IP address on Linux. Useful for those times when your Dynamic DNS is playing up and you want to check it has synced the most recent IP.

Create the script in a location of your choice

[user@machine ~]$ vi externalip.sh

Enter the following content. The #!/bin/bash tells the computer to use the bash shell to execute the script, and the line below will use the website ipecho.net to report the external ip to the terminal.

curl ipecho.net/plain; echo

Thats it! Save the script and give it executable permissions, then run it to return your IP address.

[user@machine ~]$ ./externalip.sh