Adding a new entry to the PATH variable in ZSH

后端 未结 6 1997
暗喜
暗喜 2020-11-29 14:43

I\'m using zsh and I\'m trying to add a new entry (/home/david/pear/bin) to the PATH variable but I don\'t know how.

The thing that confuse

6条回答
  •  难免孤独
    2020-11-29 15:38

    OPTION 1: Add this line to ~/.zshrc:

    export "PATH=$HOME/pear/bin:$PATH"
    

    After that you need to run source ~/.zshrc in order your changes to take affect OR close this window and open a new one

    OPTION 2: execute it inside the terminal console to add this path only to the current terminal window session. When you close the window/session, it will be lost.

提交回复
热议问题