On a dedicated server we use the shell is setup differently between accounts, which is quite irritating. When I ssh
into most users I get:
[user@machine some_dir]$
However, with some accounts I get:
bash-3.2$
I keep a lot of shells open to various machines, and there are a lot of different accounts. I have the ability to either make everyone have the same ~/.bashrc
, but I also believe there is a global config somewhere in /etc
What's the fastest way to make sure I get the same shell whenever I ssh
?
/etc/profile
is the standard location for the system-wide bash configuration on most systems.From the bash manpage:
Your best bet is a mix of the two approaches. Bash will always load
~/.bashrc
. You should place a standard file in/etc/skel/.bashrc
and~/.bashrc
that in turn sources something like/etc/bash.bashrc
. (The version inskel
will get used for new user accounts.) Put your defaults in the latter file.Example user
.bashrc
:Example
/etc/bash.bashrc
based on my prompt:With this setup, you can later change the system-wide prompt and add other settings without having to edit everybody's
.bashrc
file. Hope that helps.