.bashrc and .bash_profile

I never had the habit of setting up ~/.bashrc and ~/.bashr_profile or modifying them or any way. I was just happy with the prompt presented when I opened the terminal. It never bothered me that my normal user did not have a colour scheme, for example. Recently, I got curious about that and checked the Slackware Wiki.

Plenty of useful information there.

As a start, I created ~/.bash_profile and ~/.bashrc with the following content:

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

export VISUAL=nano
export EDITOR=nano

To implement any changes made to .bashrc, it should be sourced:

source ~/.bashrc

2 Comments on “.bashrc and .bash_profile”

  1. […] .bashrc and .bash_profile → […]

  2. […] sourcing of .bashrc is discussed […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s