3 ms·
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 onc
by joshklein 7y 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.
- yebyen 7y agoInteractive 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?
- deleted 7y ago[deleted]
- ksaj 7y agoMostly 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.