Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to take my local .bash_rc (with, for example vi keybindings), to various boxes and various users on those boxes?

Some of these settings are very user-specific (I'm the only one who likes them) and the user accounts on the boxes are not tied to real people but to applications. (in other words, they are shared by multiple humans). So I don't just want to put the .bashrc file in every home dir.

Also, it would be nice if the settings are preserved through "su" and "su someuser" commands.


share|improve this question

Use sudo -s, sudo -s -u user instead of su and su user.

share|improve this answer
Thanks, that solves the second problem (i.e. preserving settings through changing the user). – Klaas van Schelven May 12 '11 at 19:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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