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.

1
  • 1
    It is a complex interplay of several configuration variables; unix.stackexchange.com/a/151315/117549 is one answer here, but the key parts to navigate are: env_reset, env_keep, env_check, and env_delete. It wouldn't hurt to have a good canonical question on sudo environment-variable behavior here. Commented Apr 22, 2019 at 2:49