0

I am trying to set the $PATH permanantly for Vault. I have cd to etc and run sudo nano environment. This opens and I have appended my needed path onto the end like this: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/richb201/Vault"

And I save this to environment. I then open a new cli and type echo $PATH but the new path "/home/richb201/Vault" doesn't appear. What am I doing wrong?

1
  • See here for the whole story on how to correctly configure the environment system wide or per user: tecmint.com/set-unset-environment-variables-in-linux In your case, I would follow the advice given in the answer posted, so you do not need to be root and it affects your user only.
    – vanadium
    Feb 6, 2021 at 14:09

1 Answer 1

2

I set my path in ~/.profile (ie in your home directory), no sudo necessary. There is already some code in there by default to add ~/bin which you can use as an example. But you will have to log out and in again, not just open a new terminal.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.