• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

bashrc for non-root account

shwekhaw

New Pleskian
Hi. I am trying to change color of directories. I can do that for root by editing .bashrc under /root. How can I do that for other users created under parallels? Their home directories are /var/www/vhosts/domain.com
Using root account, I created .bashrc under those directory and chown to the user. But colors are not changing. I also adding the color in /etc/bashrc system wide file and it does not work either.
 
Hello,

Login your user through SSH and try to execute following command

Code:
PS1='\[\e[0;32m\]\u\[\e[m\] \[\e[1;34m\]\w\[\e[m\] \[\e[1;32m\]\$\[\e[m\] \[\e[1;37m\]'
 
I understand this encoding. However how do I make it permanent so I don't have to enter this command every time I login. Why the shell is not reading .bashrc under login path?
 
i also need support to get the same .bashrc that is available for root user to be also used for domain users.
 
Hi. I am trying to change color of directories. I can do that for root by editing .bashrc under /root. How can I do that for other users created under parallels? Their home directories are /var/www/vhosts/domain.com
Using root account, I created .bashrc under those directory and chown to the user. But colors are not changing. I also adding the color in /etc/bashrc system wide file and it does not work either.

You also need to add a .profile inside their home directories to automatically apply .bashrc settings :

Code:
 ~/.profile: executed by Bourne-compatible login shells.

if [ "$BASH" ]; then
  if [ -f ~/.bashrc ]; then
    . ~/.bashrc
  fi
fi
 
Back
Top