I struggle to see the difference between
/etc/environment. To me they both do the same thing, with a difference syntax. The manpages were no help. So what is the difference?
Additionally, I'd like to find a way to add paths to the
PATH environment variable for all users. Adding them to the two aforementioned files works for all users, but doesn't work with sudo, as can be verified by running
sudo sh -c 'echo $PATH'.
To solve that problem, I believe I should edit the file
/etc/pam.d/sudo, but what should I put in there?