For mistake I have added a path that I don't want to use.
I have create a file named .base_profile, exported the path using the command source .base_profile, but I don't need this path, how to delete it?
Maybe the title wasn't so appropriate, but I haven't modified the PATH variable.
I have written this in the .base_profile file:
export MP=$MP/usr/local/mysql/bin
And then used the source command.The problem is with the MP variable, which is not one that I want, it's too long.I want to delete it, how to do it?
The way to restore your path to the default is PATH=$(getconf PATH)
Do an
echo $PATH
Then grab with the mouse that part, which looks useful, and append it to:
PATH=
So for example - not on an OSX-System:
PATH=/home/ramy/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
If you only sourced the path in one terminal, you can, alternatively, open a new terminal.
If you added the source-command to one configuration script, you have to remove it there, to get rid of it permananetly.
Fix your errors in the file, and fix the env var with
export PATH=[the correct one]
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