Closed pavel-kirienko closed 6 years ago
I was also wondering whether to use .profile
vs .bash_profile
.
Any insights anybody?
(I am using Ubuntu Bionic)
Works for me flawlessly with ~/.bashrc
on Ubuntu 16.04
~/.bashrc
is also sourced in the default ~/.bash_profile
on CentOS and also RedHat. Also on the CI front, ~/.bashrc
is all that's sourced automatically on steps within CircleCI, I'm guessing it similar on Jekins and Travis, but I currently have no confirmation of that.
You can use any file that works...
All end up with the end result being the same.
It looks like we can merge #74 to suggest that .bashrc
is the right place in most cases then ...
The installer script suggests using the file
~/.bash_profile
for bash environment settings, which is only read by login shells:https://github.com/pyenv/pyenv-installer/blob/92c4cd2812d12c8170f4970f8d4d71e18d093bd7/bin/pyenv-installer#L53-L56
Is it not possible to use either
~/.profile
or~/.bashrc
instead? They are sourced by interactive shells of all types, which seems to make things easier for the user.