How do you guys quickly sync your settings (especially bash aliases and ssh keys) across your machines?

Ideally i want a simple script to run on every new server I work with. Any suggestions?

    • macallik
      link
      fedilink
      1
      edit-2
      1 year ago

      That my solution. I have a ‘Sync’ folder on every device’s Home folder, and then I use some aliases to determine whether to grab the bash_aliases file or replace it:

      • alias dba=‘diff -s ~/.bash_aliases ~/Sync/.bash_aliases’ # compare files
      • alias s2ba=‘cp ~/Sync/.bash_aliases ~/’ # Push from Sync folder to current bash aliases
      • alias ba2s=‘cp ~/.bash_aliases ~/Sync/’ # Push from current bash aliases to Sync folder

      By far, the diff alias is the most used. It allows for a quick check on what is different between files w/o having to open them up