How to manage Environment variables in Linux ?
About
This page is about Process Environment variable in Linux.
Management
Set
Shell
They are set generally with the shell. See Variable
PAM
pam permits also an admin to set environment variable: See pam-env
The file used to set the environment variable are the below one:
/etc/security/pam_env.conf: Default configuration file - When someone logs in, this file is read and the environment variables are set according.
/etc/environment: Default environment file - simple KEY=VAL pairs on separate lines
HOME/.pam_environment: User specific environment file
Get the env of a process
Start with a clean environment
clean env