1. Sudo is an ordinary user who temporarily has root privileges. The advantage is that most of the time with user-defined configurations, a few cases can be done with sudo for root privileges.
Therefore, it is important to note that after you have used sudo, you are no longer the original user, and you cannot use your own commands. As an example: sudo source ... The command fails to execute, prompting for no source command. But you get rid of sudo and you can do it again. (from the side can reflect sudo is not equal to get root all rights.) Do not misuse sudo.
2. System environment variables, corresponding to the/etc/profile file, valid for all users. The user environment variable, corresponding to the ~/.BASHRC file, is only valid for its own users.
Therefore, in non-root situations, most environment variables are recommended to operate on ~/.BASHRC.
Linux sudo system environment variables user environment variables