Bash: take local .bashrc (or similar) settings to remote boxes w/o putting .bashrc on every instance

2

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.

Klaas

Klaas van Schelven

Posted 2011-05-05T07:25:32.213

Reputation: 397

Answers

1

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

LaC

Posted 2011-05-05T07:25:32.213

Reputation: 2 263

Thanks, that solves the second problem (i.e. preserving settings through changing the user). – Klaas van Schelven – 2011-05-12T19:57:17.340