Share Your Bash Configuration for All Your Computers
In the bash configuration (.bash_profile
or .bashrc
), you can set up useful things to help your command line interface. For example, alias
and function
can be set to make a shortcut command for a longer command. Environment variables are also configured so that other applications can refer a proper value.
.bash_profile
When you have multiple computers, each computer will have own bash profile. Although this is reasonable, this is a bit cumbersome if you want to have a similar working environment for each computer and want to sync the configuration as much as possible. In my case, I often add some aliases at work. Then, I want to use them at home on my personal computer.
There would be multiple ways to sync between them. Among them, it is quite easy to use Dropbox for syncing. Basically, you store your bash configuration in your Dropbox.
Then, each computer uses the stored configuration with a symbolic link. Whenever there is a change, Dropbox will take care of syncing between computers.
Conclusion
When you have several computers, you may want to sync some configuration files. You can store those files in Dropbox and link to point it. Dropbox will sync those files and help you to have the same working environment across computers. In addition to .bash_profile
or .bashrc
, .gitconfig
could be good to sync because it contains specific aliases for git
.
.gitconfig