As a developer, you may or may not have set up VMs (Virtual Machines).
Developing cross platform we will need to tell our shell such as brew, bash, powershell, or zsh to which path they shall export the command to.
So that the shell can translate what you wanted to do from the command line to a language that your machine can understand and execute.
For most developers we use the good old Bash instead of zsh, both of them works. To check which shell you're using:
echo $SHELLIf it is not /bin/bash and assuming you're in the $HOME or root directory of your profile, then you may change it by:
chsh -s /bin/bashKill then repoen Terminal, it shall be updated to Bash, you can run echo $SHELL again to double check.
echo $PATHThis will give you all the registered PATHs.
which brewAbove command should prints out the current exporting PATH for Homebrew.
export PATH="/usr/local/bin:${PATH}"export PATH="/opt/homebrew/bin:${PATH}"You've probably noticed that the methods above are temporary.
In the next update I'll markdown how to make it stick.