this post was submitted on 18 Jul 2024
269 points (98.6% liked)
Programmer Humor
19512 readers
334 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
So, assuming bash is your shell, the ~/.bash_profile is executed for login shells for the user logging in.
~/.bashrc is the initialization script for when starting a bash session (for the current user).
In my experience, the ~/.bashrc will also execute ~/.bash_profile if it exists. So you can use either.
What would I want in login environments I wouldn't also want in interactive ones though?