Skip to main content
replaced http://unix.stackexchange.com/ with https://unix.stackexchange.com/
Source Link

Customizations for interactive shells go into ~/.bashrc. Things that you want to run when you log in go into ~/.profile (or ~/.bash_profile, but it's often not loaded when logging in graphically).

Put this function definition in ~/.bashrc.

Since bash doesn't load .bashrc when it's a login shell, force it to do so: write a ~/.bash_profile containing

. ~/.profile
case $- in *i*) . ~/.bashrc;; esac

i.e. load ~/.profile, and also load ~/.bashrc if the shell is interactive.

See Alternative to .bashrcAlternative to .bashrc and the posts linked there.

Customizations for interactive shells go into ~/.bashrc. Things that you want to run when you log in go into ~/.profile (or ~/.bash_profile, but it's often not loaded when logging in graphically).

Put this function definition in ~/.bashrc.

Since bash doesn't load .bashrc when it's a login shell, force it to do so: write a ~/.bash_profile containing

. ~/.profile
case $- in *i*) . ~/.bashrc;; esac

i.e. load ~/.profile, and also load ~/.bashrc if the shell is interactive.

See Alternative to .bashrc and the posts linked there.

Customizations for interactive shells go into ~/.bashrc. Things that you want to run when you log in go into ~/.profile (or ~/.bash_profile, but it's often not loaded when logging in graphically).

Put this function definition in ~/.bashrc.

Since bash doesn't load .bashrc when it's a login shell, force it to do so: write a ~/.bash_profile containing

. ~/.profile
case $- in *i*) . ~/.bashrc;; esac

i.e. load ~/.profile, and also load ~/.bashrc if the shell is interactive.

See Alternative to .bashrc and the posts linked there.

Source Link
Gilles 'SO- stop being evil'
  • 865.4k
  • 205
  • 1.8k
  • 2.3k

Customizations for interactive shells go into ~/.bashrc. Things that you want to run when you log in go into ~/.profile (or ~/.bash_profile, but it's often not loaded when logging in graphically).

Put this function definition in ~/.bashrc.

Since bash doesn't load .bashrc when it's a login shell, force it to do so: write a ~/.bash_profile containing

. ~/.profile
case $- in *i*) . ~/.bashrc;; esac

i.e. load ~/.profile, and also load ~/.bashrc if the shell is interactive.

See Alternative to .bashrc and the posts linked there.