The easiest solution to both work with zsh and run ~/.profile
is to create a ~/.zprofile
that enters sh emulation mode while it runs ~/.profile
:
emulate sh
. ~/.profile
emulate zsh
If you have a recent enough zsh (on Ubuntu, that means since lucid, I think), you can simplify this to emulate sh -c '. ~/.profile'