Hacker News new | ask | show | jobs
by joshklein 2483 days ago
Profile is for login shells (thus executed once when logging in at the terminal or over SSH). The rc file is for interactive non-login shells (thus executed once each time you open a new e.g. xterm window).

But some systems treat all terminal emulator windows as login shells by default (e.g MacOS), though you can change that behavior.

1 comments

Interactive shells can also be login shells, and they run bashrc too (don't they?)

Wait... is this the reason why you see profiles that load bashrc?

Mostly running a shell script doesn't necessarily need to have all your aliases included, for one of many possible examples, but it conveniently doesn't really hurt things either. Making one setting the default is a way to promote "sameness" for those who aren't about to go about adapting different use cases.

But for "power users," the ability to alter the experience depending on context is there awaiting your specifics.