Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

1123884

Suspended
Original poster
Mar 20, 2018
12
1
Hi!

I like using Terminal with ZSH. I use it on two computers: Macbook Air with macOS Mojave and PC with Ubuntu 18.10.

I'd like to sync my .zshrc file between those computers to have the same aliases and other stuff on both.

I need a solution for local network (system solution would be the best, if not maybe something from GitHub/Official Repositories/Homebrew).

Can you recommend me some?

Thank you in advance and have a great day!
 
Hi!

I like using Terminal with ZSH. I use it on two computers: Macbook Air with macOS Mojave and PC with Ubuntu 18.10.

I'd like to sync my .zshrc file between those computers to have the same aliases and other stuff on both.

I need a solution for local network (system solution would be the best, if not maybe something from GitHub/Official Repositories/Homebrew).

Can you recommend me some?

Thank you in advance and have a great day!
I can think of multiple solutions if you’re OK with a bit of command line work:
- @Weaselboy’s tip on using rsync is a great start. Have the system run it periodically to keep the files synced.
- You yourself mentioned git, which could do the same thing including keeping a canonical copy of the .rc file in a third place, as long as you remember to push changes when relevant.
- If you have access to object storage (Nextcloud, Dropbox, an S3 or B2 storage), you can either create a symlink to the file in the synced directory (for services that keep one), or use the rclone utility in pretty much the same way you’d use rsync between two computers.

If you don’t carry secrets in the .rc file, the two latter methods (potentially) allow for syncing wherever in the world you happen to be as long as you have a network connection. If you do carry secrets you could call gpg from within the sync script to encrypt the file before sending it out on the Internet, and to decrypt it before attempting to use it locally.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.