-1

While processing with Mac terminal, sometimes I got a message like 'something is not command'.

I think there's a way to declare path globally where I am. (Such as 'brew')

I want to add path in the list that when I 'echo $PATH'

'export Path=~/path/bin:$PATH' is defined and evaporated when I exit the terminal.

Share your knowledge to me. Thanks.

Boolhwi
  • 39
  • 5

1 Answers1

0

You have the right command: export PATH=/your/custom/folder:$PATH What you're missing is to add this somewhere. If you're using bash as a shell this might be ~/.bashrc, if it's zsh something like ~/.zshrc and just append your export line to the end of the file. You can check what shell you're using with echo $SHELL.

Changes are reflected the next time you open a terminal, or just run source ~/.zshrc to update the current session.

David Rubin
  • 196
  • 6
  • https://stackoverflow.com/questions/11530090/adding-a-new-entry-to-the-path-variable-in-zsh this also helps – Boolhwi Jul 08 '22 at 08:35