views:

63

answers:

2

I have the following lines in my .zshrc

source /etc/profile    
source $HOME/.profile

My .profile is not loaded without them, although .profile should be loaded by default in Unix systems.

How can you load .profile without sourcing it at .zshrc?

+2  A: 

Look in the Zsh manual where it says to use ~/.zprofile instead of ~/.profile.

Martin Geisler
+2  A: 

In addition to what Martin says about zprofile vs profile, also note that /etc/zprofile and ~/.zprofile are only read when zsh is started as a login shell. If it is "just" an interactive shell, it will only read .zshrc. So the question is how you are starting the zsh. If you use something like Gnome Terminal, you can set in the Profile Preferences that the shell should be started as a login shell.

More info: Z-Shell User's Guide

dseifert