I have RHEL 7 and I want to set environment variable for sudo.
I have run
sudo su in order toswitch to root user and added
export to its
.bashrc file. Then I have reloaded them with
Now when I run
root mode it has environment variable. However, when I exit and run
sudo env it does not.
Why this is happening?