The Computer Oracle

When should I put configurations into .bashrc vs into. .bash_profile?

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Thinking It Over

--

Chapters
00:00 When Should I Put Configurations Into .Bashrc Vs Into. .Bash_profile?
00:22 Accepted Answer Score 16
00:50 Thank you

--

Full question
https://superuser.com/questions/10634/wh...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#bash

#avk47



ACCEPTED ANSWER

Score 16


This post explains that ~/.bash_profile is used for login shells, while ~/.bashrc is used for other interactive shells. Here's a useful video as well, which gives the example of some printer settings as something you might want on a login shell. In the end, it really doesn't matter too much, it's just a semantics thing. Plus, as the article says:

... the point is generally moot because most people edit the files so one calls the other anyway.