I work with a few dozen servers. I'd really like to streamline my work, but at the same time I'm a bit reluctant, since it would be a lot of work synchronizing all servers. The servers are in different networks so there's little use setting up shared folders.

What options do I have?

  • Are you looking for a configuration management solution? – Marki Jan 28 '14 at 20:41
  • No. At least I don't think so. I just want to maintain a handful of aliases and scripts. Preferably in a simple way. – Sam Jan 28 '14 at 20:51
  • 1
    Then do it the manual way by using one central system, generate ssh keys for the other ones and script your way around copying files. Do the 12 machines have a common place they can go to, or none at all? Otherwise you could put a folder with scripts into an SVN repository for example. And do the rest via ssh. – Marki Jan 28 '14 at 20:55
  • There are basically two routes to go, either use a configuration management system like puppet or chef, or create a repository with the configuration files (e.g. using git). – Marco Jan 28 '14 at 20:55
  • Please give some more details. How many files do you want to synchronize? Whole directory structures? Just your .bashrc or equivalent? You can share folders across different networks by the way. – terdon Jan 28 '14 at 21:00

Here is my approach for managing bash_profile on multiple machines. (Designed for mac, but could be adapted to linux)

Put your bashrc (or bash_profile) into a github gist.

Here are mine


Use a script that does a wget of the gists and install them.


curl -L https://gist.github.com/spuder/11360447/raw/ > ~/.bash_profile
curl -L https://gist.github.com/spuder/730226a73e45f5d3cff5/raw/ > ~/.bash_ps1

Install the latest gist with this command

curl -L https://gist.github.com/spuder/11360474/raw/ | bash -x

Once I've run the above command just once on every machine, I then have an alias bashupdate which will pull the latest changes.

alias bashupdate='curl -L https://gist.github.com/spuder/11360474/raw/ | bash'

As far as system management, use the following tools



Personally I use dotify to simplify the git workflow and some conditionals in my ZSH and Emacs configs (host name, OS etc.). Also instead of custom scripts I tend to mainly do shell functions nowadays...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.