I'm used to Ubuntu, where I just create a .bash_aliases file and away you go. In CentOS, how do I get .bashrc to load the .bash_aliases file?


If i look into my .bashrc i see the following code

if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases

This sources the .bash_aliases if present.

May be you have simply add this fragment to your .bashrc in your centos box.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.