$PATH is not set properly


New Member
Aug 26, 2021
Reaction score
I am using Ubuntu 64-bit on a VM and installed an app, added it to $PATH using export PATH=$PWD/bin:$PATH in my terminal (T1). Worked fine. Then i wanted to use the command in another terminal (T2) and got an error message that the command is unknown (exactly that, no more information). I checked echo $PATH and the path was really missing, while I did the same in the other terminal (and it's child terminals) where it was in there. Then i added the the path again, in T2, opened a new terminal (T3) where the path was missing again. To resolve it, I navigated to $HOME/.profile and manually added the path, but it doesn't change anything, same as above. Exact line added to .profile: . "$HOME/solana-release/bin" (I used the scheme from the line above). I used source $HOME/.profile in the new terminal. The response is bash: .: /home/longroad/solana-release/bin: is a directory
It would be great if someone could help me with this, thanks!

Your post is a little hard to read, but here goes.

You should never update your path on the command line. While you can do that, it will not persist and you risk corrupting your path if you error or forget something while exporting it.

You should update your path in your profile line that sets your path. Once you've updated it there. Then you run ". /path/to/profile".

If you read that above, there is a period "." then a space " ", then the path to the profile. You execute it in that fashion, not like executing a script.

Either that or logout and back in so that it automatically executes the profile.

Members online