Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

7
  • That is really weird. That is exactly what I tried right now and it doesnt seem to work for me. I'm using Ubuntu 16.04. I don't get the variables in ~/.bashrc Commented Feb 7, 2018 at 18:45
  • I've tested it on CentOS. Commented Feb 7, 2018 at 18:46
  • If you su - user1 and then printenv, do you see the env variables you want? Commented Feb 7, 2018 at 18:47
  • Yes, that works. If I printenv when I'm user. Then, it works. Commented Feb 7, 2018 at 18:48
  • But I need a one-liner that involves environment refresh Commented Feb 7, 2018 at 18:49