Hi,
I want to add a path to PATH. I added export PATH=$PATH:$HOME/newpath in the ~.profile. I exit the shell and reenter shell. After I type echo $PATH. The new path is not added. I don't know why. Can someone give advice?
Thanks!
Hi,
I want to add a path to PATH. I added export PATH=$PATH:$HOME/newpath in the ~.profile. I exit the shell and reenter shell. After I type echo $PATH. The new path is not added. I don't know why. Can someone give advice?
Thanks!
.profile is executed only for a login shell. For bash you should use ~/.bashrc, for ksh ~/.kshrc but you need to add to your .profile:
ENV=$HOME/.kshrc
export ENV
and logout and login again. Although newest ksh-es use ~/.kshrc by default.
Hi yazu and psshah,
Thanks a lot!