Skip to content

Instantly share code, notes, and snippets.

@david-sanabria
Created February 14, 2017 00:20
Show Gist options
  • Save david-sanabria/825c2bba64f14277c119ca094510d5a9 to your computer and use it in GitHub Desktop.
Save david-sanabria/825c2bba64f14277c119ca094510d5a9 to your computer and use it in GitHub Desktop.
Check your public IP address from the command line
#!/bin/bash
#
# CheckIP.sh
# Check your public IP address from the command line using Dynamic DNS
# Source: user "lv4tech" post to commandlinefu.com
#
# This script will display just your IP address as it appears from the
# CheckIP service as dyndns.com
#
#echo -e "Your Public IP Address is: "
curl -s http://checkip.dyndns.org/ | grep -o "[[:digit:].]\+"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment