Env variables not being stored

July 24, 2015 2.2k views
VPN Control Panels

I am trying to store env variables from my droplets linux terminal. I tried to follow the documentation that says to use the following command: env TEST_VAR=VAR to set a variable and the response shows the TEST_VAR=VAR displayed with other env variables, but when I use the command printenv the variable does not show up in the list of stored env variables. Any reason why this is happening?

1 Answer

You can use export TEST_VAR=VAR instead of env TEST_VAR=VAR

Have another answer? Share your knowledge.