Ubuntu environment variables Store environment/user variables in Ubuntu in the file ~/.pam_environment which is targeted for this purpose.