I'm completely new to using terminal, and while trying to use brew
to install some stuff, I did something to PATH
. Now if I tell it to do something it always returns
-bash: blah: command not found.
Is there any way to reset something to fix this? What should I do?
In the Terminal app on your Mac, choose Terminal > Quit Terminal.
Press Command + Space Bar on your Mac keyboard (alternatively, press F4) Type in “Terminal” When you see Terminal in the Spotlight search list, click it to open the app.
Type exit at the command line and press Return.
Your path is usually set in either your .profile or .bashrc file. These are found in the root of your user's home directory.
You should be able to fix them by running these two commands in the terminal. They contain the default executable paths
export PATH="/usr/bin:/bin:/usr/sbin:/sbin" export PATH="/usr/local/bin:/usr/local/sbin:$PATH"
You can set your path
this way:
export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
and you can always add other directories if you want. Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With