Skip to main content
1 of 5
cuonglm
  • 158.1k
  • 41
  • 341
  • 419

By convention, .bashrc is place where user store the customize configuration for the shell.

These customize configuration can be environment variables, aliases, fancy prompt. With a non-interactive shell, those short of things are meaningless. Moreover, a non-interactive shell can be call in many contexts, you're not sure those environment variables can lead to false negative case, or even security vulnerable.

A closest example is alias. With an alias like:

alias cp='cp -i'

Then it hang your non-interactive shell forever.

cuonglm
  • 158.1k
  • 41
  • 341
  • 419