Hacks, Linux, Programming, Scripting

HOWTO: Always know your home computer’s IP address from anywhere using Dropbox

To always know what your home machine’s IP address is (and while I’ll assume that you’re running Kubuntu, this can be adapted using the following bash script to any machine).

  • Apt-get ‘kcron’.
  • Open Task Scheduler and set the following bash script to run every five minutes:
#!/bin/bash
J=`wget http://checkip.dyndns.org/ -qO - | grep -Eo '\<[[:digit:]]{1,3}(\.[[:digit:]]{1,3}){3}\>'`
K=`date`
echo "$J $K" >> ../Dropbox/ANYDIRECTORYYOUCHOOSE/output.txt
  • Ensure the script is executable, and test it in a shell.

Now, you can always see what your home computer’s IP address is in any browser window; I use this in case there are issues with SSHing into my home box.

1 thought on “HOWTO: Always know your home computer’s IP address from anywhere using Dropbox

Leave a Reply