Reputation: 21996
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?
Upvotes: 6
Views: 13611
Reputation: 247062
The way to restore your path to the default is PATH=$(getconf PATH)
Upvotes: 7
Reputation: 7640
Fix your errors in the file, and fix the env var with
export PATH=[the correct one]
Upvotes: 2
Reputation: 36260
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.
Upvotes: 4