iLoveNachos
iLoveNachos

Reputation: 25

$PATH doesn't update

I'm trying to add the folder ~/local/bin to my $PATH, but it does not work. I have tried everything. I have followed every guide on Google and YouTube, I have read dozens of similar questions on StackExchange, I have asked several computer experts I know, I have copied friends' files that works fine for them -- but nothing helps here.

I have tried:

I have tried every single possible combination of these, and more. That is, I have tried with just the first thing, then just the second thing, then the first and second thing together, then just the third thing, etc etc. I have literally tried more than 50 different things now, and echo $PATHstill gives me absolutely nothing but /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/binin return.

I have of course also used source [file] after every single change, and also tried restarting the terminal after every change. Nothing helps.

This really frustrates me, as I've used a lot of time trying to fix this, and I find very little help about this online, because this apparently shouldn't ever be an issue to anyone. Well, it doesn't work here. Please, someone, help me. :-(

Upvotes: 2

Views: 2123

Answers (1)

l'L'l
l'L'l

Reputation: 47282

The syntax you're using is not correct, in ~/.bash_profile it should be:

export PATH="$HOME/local/bin:$PATH"

Save the file then do:

source ~/.bash_profile

echo $PATH should then have output which includes:

/Users/Username/local/bin:...

The critical thing is having the correct syntax when adding anything to your profile.

Upvotes: 2

Related Questions