I'm using screen, and I have several aliases in my ~/.bash_profile, for example python=python-2.6. But for some reasons these aliases don't work when I work in screen. How can I make them work?

link|improve this question

72% accept rate
feedback

3 Answers

up vote 3 down vote accepted

.bash_profile gets run when in a login shell. You'll probably want to put your aliases in the .bashrc file. Or you could just execute your .bash_profile each time that you start up a shell in screen

link|improve this answer
feedback

Use the -l option to bash in your .screenrc to start your screen session's bash shells as login shells:

screen bash -l
link|improve this answer
feedback

If you run exec bash after you start up screen, they will work

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.