Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
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?
.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
Use the -l option to bash in your .screenrc to start your screen session's bash shells as login shells:
screen bash -l
Add this line to your ~/.screenrc file:
The initial dash executes the shell with login option
If you run exec bash after you start up screen, they will work