3

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?

  • Doesn't screen -l work? – lhf Jul 6 '12 at 22:11
4

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

3

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .