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.

3
  • I tried that, ran source /etc/bash.bashrc, nothing changed (for visudo at least). What is supposed to be the difference? I thought if the files are sourced, it's the same with and without export, am I wrong? Commented Dec 13, 2012 at 11:13
  • 2
    @LevLevitsky You're mistaken. Exporting a variable makes it part of the shell's environment, and thus, is propagated to children upon fork(). Without export, that doesn't happen (the variable exists in the shell, but is not propagated to its children). Commented Dec 13, 2012 at 11:14
  • That's good to know, but visudo still behaves the same way. Is there another reason for that? Commented Dec 13, 2012 at 12:09