Skip to content

Comment on How to add a directory to your PATHparent

Comments

And you can't really, say, put it in both your `.zprofile` and `.zshrc` or `.bash_profile`, `.profile`, and `.bashrc`, because then it'll get executed more than once and you'd need to maintain some kind of state to prevent that.

FWIW, profiles are loaded on 'from scratch' logins; RC files are loaded all the time.

* https://superuser.com/questions/657848/why-do-we-have-login-...

* https://askubuntu.com/questions/879364/differentiate-interac...

RC files are loaded all the time

Not necessarily. Bash won't do it on its own for a login shell, but there's probably a bit in the /etc/profile your distro provides that does it.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.