Sample Header Ad - 728x90

How do I add a directory to PATH when using `zsh` in Sierra

29 votes
5 answers
131225 views
In macOS Sierra 10.12.x, what is the modern way to add a directory to the PATH environment variable that can work across shells or specifically work with *zsh* shell (I switched from the default bash to zsh ). I have seen some Questions and Answers such as [this one](https://apple.stackexchange.com/q/12629/17907) that are bash-specific. And I have seen some such as [this one](https://apple.stackexchange.com/q/106355/17907) about launchd but it seems I've read launchd is not the right right in later versions of macOS (not sure). I could find no specific references for Sierra, so I am posting now. I am trying to install Maven with instructions saying: >Add the bin directory of the created directory apache-maven-3.3.9 to the PATH environment variable
Asked by Basil Bourque (13982 rep)
Mar 6, 2017, 03:23 AM
Last activity: Mar 14, 2023, 09:24 PM