I stuffed up (basically wiped) my PATH variable.
Is there any way to reset it to the default?
I look at How do I reset the $PATH variable on Mac OS X?, but I find it very confusing. As far as I know I stuffed up my
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.Sign up to join this community
I have the following in my
PATH declaration overrides any existing
PATH setting (it doesn't include
$PATH). The path used is the OS X default.
The second line appends
~/bin to the
PATH and it is a personal preference, not a default.
After edit, restart your session — or use command
source ~/.profile to activate the changes immediately.
In the case of logging in as a normal user and invoking
su - root, I found that Mac OS X 10.8.5's bash was ignoring
.bash_profile; I was unable to change root's
$PATH by editing those files. What did work was editing
/etc/paths. After exiting the root shell and entering again with
su - root, the new path was present.