Why doesn't the screen command source my .profile?
When I start a new screen, the aliases that I have set in my ~/.profile
do not seem to be sourced.
Does anyone know where I can change this or which file is actually read when starting a new screen?
Solution 1:
For an alias to work in ~/.profile the session needs to be a login shell. Bash, which is probably what you're using, is typically read from ~/.bash_profile.
There's a good explanation of the differences mentioned here:
https://superuser.com/questions/183870/difference-between-bashrc-and-bash-profile
Solution 2:
Apple uses ~/.bash_profile as mentioned above. If you want bash inside screen to behave exactly as the Apple Terminal, create a ~/.bashrc file with the command
source /etc/profile
which will include all Apple settings.