Answer the question
In order to leave comments, you need to log in
Why is .bashrc not running on Centos 8?
I bought a virtual machine with centos 8. Never had anything to do with 8 before.
There is a
.bashrc file with the line
And this file is not executed at the entrance until /bin/bash is forced to run
.
alias vim='nvim'
Answer the question
In order to leave comments, you need to log in
in ~/.bash_profile write or add there
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
When bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable. The --noprofile
option may be used when the shell is started to inhibit this behavior.
When an interactive shell that is not a login shell is started, bash reads and executes commands from ~/.bashrc, if that file exists. This may be inhibited by using the --norc option. The --rcfile
file option will force bash to read and execute commands from file instead of ~/.bashrc.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question