0

Well I know that I can print all environment variables but I have a hard time to work with them for the past year I always edit my .bashrc or .zshrc file and add in the end the environment variables like this

export envName=someName

but is this the best scenario?

where actually all the values from

printenv

coming from and where is the best location to store my environment variables like java/go/ etc.

1 Answer 1

1

Those variables are set in multiple places; I won't even try to list them all.

As regards appropriate places to add or modify environment variables, it depends on the purpose. Some suggestions are mentioned on the wiki page EnvironmentVariables together with a general discussion about the topic.

2
  • thanks for your answer cause my main problem is that i use zsh in daily basic and store my enviroment variables in .zshrc and when i go to bash i have complitly different variables thank you for your answer Commented May 2, 2019 at 10:15
  • @Theodosis: Ok. If you set them system wide in e.g. /etc/environment they ought to be present in both. Commented May 2, 2019 at 11:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .