Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6220411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T07:57:09+00:00 2026-05-24T07:57:09+00:00

I’m a pretty active command line user and I have shell accounts all over

  • 0

I’m a pretty active command line user and I have shell accounts all over the place. MacBooks, Linux desktop machines, Linux servers, Cygwin on XP, you name it.

How can I keep my shell configuration (.bashrc, .vimrc etc.) in sync across all these machines using the limited tools available across all platforms?

I have been using rsync in a pretty limited manner that involves manually copying some files over when I need them, but I want a standard way for setting up the same basic shell environment across all my machines. Tell me your shell account management strategy.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T07:57:10+00:00Added an answer on May 24, 2026 at 7:57 am

    I have folder on Dropbox with global, per OS, and per machine shell configs:

    $ ls ~/Dropbox/shell/bash
    bashbootstrap  bashrc
    bashrc-Darwin  bashrc-Darwin-laptopname  bashrc-Darwin-mininame
    bashrc-Linux  bashrc-Linux-machineone  bashrc-Linux-machinetwo
    

    bashrc is loaded on every machine, bashrc-Linux, bashrc-Darwin are loaded on their respective OSes, and several configs are specific to individual machines. (By the way, Darwin is the name of OS X’s BSD-like kernel.)

    What ties it all together is the bashbootstrap file. It loads each applicable config file in order of increasing specificity, this allows per OS and per machine overrides to have higher precedence. Additionally, we silently skip missing config files; you need not create empty config files for each of your machines to keep the script happy.

    On a new machine, after installing Dropbox on ~/Dropbox, I move away the default .bashrc and just symlink the bootstrap file in its place instead:

    $ mv ~/.bashrc ~/.bashrc.bak
    $ ln -s ~/Dropbox/shell/bash/bashbootstrap  ~/.bashrc
    

    Oh, and here are the contents of the bashbootstrap file:

    if [ -z "$PS1" ]; then
       return
    fi
    
    dropboxshelldir=~/Dropbox/shell
    dropboxdir=$dropboxshelldir/bash
    masterbashrc=$dropboxdir/bashrc
    osbashrc=$masterbashrc-`uname`
    localbashrc=$osbashrc-`hostname | cut -d. -f1`
    
    echo -n "Applicable shell configs: "
    for bashfile in "$masterbashrc" "$osbashrc" "$localbashrc"; do
      if [ -r $bashfile ]; then
        . $bashfile
        echo -n "`basename $bashfile` "
      fi
    done
    echo
    
    # Set convenience aliases
    myed=${VISUAL:-${EDITOR:-vim}}
    alias editbashrc="$myed $masterbashrc"
    alias editosbashrc="$myed $osbashrc"
    alias editlocalbashrc="$myed $localbashrc"
    

    One final note, this script also provides three convenience aliases for editing your Bash config files without having to remember where they are stored.

    • editbashrc: Edit the global config file.
    • editosbashrc: Edit the OS-specific config file.
    • editlocalbashrc: Edit the machine-specific config file.

    I only tested this on Bash, but it could work on other Bash like shells. But, as they say, your mileage may vary.

    I made a blog post about this here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a text area in my form which accepts all possible characters from
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.