I have the .bashrc file, but it is not loading when I connect my VPS through SSH.

The content of .bashrc looks like below:

alias ls='ls --color=auto'
force_color_prompt=yes
PS1='\[\033[1;36m\]\u\[\033[1;31m\]@\[\033[1;32m\]\h:\[\033[1;35m\]\w\[\033[1;31m\]\$\[\033[0m\] '

It provides a colorful terminal look.

How to fix the problem of .bashrc not loading?

If you always want the content of your .bashrc file processed, you might add something like the following to your .bash_login file:

if [ -f ~/.bashrc ]; then
    . ~/.bashrc
fi

If you don’t have this file, just add a new one at your home directory.

Save the content and exit the terminal.

Re-connect the VPS. It works.

David Yin

David is a blogger, geek, and web developer — founder of FreeInOutBoard.com. If you like his post, you can say thank you here

Leave a Reply

Your email address will not be published. Required fields are marked *