Sharing aliases and other bash configurations using Dropbox
I have two computers: one at work and one at home. Dropbox has been a fantastic way for me to effortlessly share files between the two.
I often setup aliases, and other bash configurations, in my
.bash_profile to make life easier. Though, sometimes I’m not so careful; I’ll set something up on one computer, but forget to do it on the other.
Sharing configurations across two computers is easy thanks to Dropbox. Here’s how:
- Create a file in your Dropbox. I called mine
.bash_profile_shared, and stored it in the root Dropbox folder, for consistency’s sake, but you can call whatever you like, and store it anywhere on Dropbox.
- Edit your local
.bash_profilefile, and add this as the first line of your script:
source ~/Dropbox/.bash_profile_shared, or whatever you named your shared Dropbox file.
- Reload your Terminal, or
And, that’s it. Anytime you’d like to share a config, just add it the
.bash_profile_shared file in Dropbox (and wait for it to sync).