wwwhizz’ blog Blog about some tech, some linux, my MIDIbox SID, etc.

21Jan/112

Sync config files between PC’s using Dropbox

Synchronizing your configuration files between different boxes can be done very easily using Dropbox. Dropbox is a Web-based file hosting service, syncing files with the cloud and all your PC's (Windows, Mac OSX and Linux, mobile applications are available too). For free! As Dropbox appears as a folder on your hard-drive you can easily symlink these files using ln -s

Installing dropbox:

Make sure you have Dropbox installed.
You can create an account here. (yes, that's a refferal link, but it will give you and me 250MB extra)
Information about how to install Dropbox under linux can be found here. There are Fedora and Debian/Ubuntu packages available, as well as a Dropbox-repository for Ubuntu. Other Distro's need to compile from source.

Information about running a textbased (CLI) version can be found here.

Symlink to Dropbox:

In order to sync the files in your dropbox, you simply move the configuration files you want to sync into a folder in your dropbox (mine is called nix):

mv ~/.bashrc Dropbox/nix/.bashrc

The following step is to create a symlink for the original location to the new location:
ln -s Dropbox/nix/.bashrc .bashrc

On other PC's you can simply remove the original config file and then create a symlink to your Dropbox.

Note that ln -s will also work for any directory. In case you're wondering, these are the files and folders I keep synced in my dropbox:

~/.bashrc
~/.screenrc
~/.vimrc
~/.bash_aliases
~/.bash_logout
~/.ssh

Comments (2) Trackbacks (0)
  1. You can leave off the last argument of “ln -s”: it defaults to the original filename. So:

    ln -s Dropbox/nix/.bashrc

    And to set up your stuff on a new account, you can even do this:

    ln -s Dropbox/nix/.* .

    (It will complain about the magical entries . and .., but you can ignore that.)

  2. Very nice 🙂 Thanks for the add-on 🙂


Leave a Reply

No trackbacks yet.