How to manage Environment variables in Linux ?


This page is about Process Environment variable in Linux.




They are set generally with the shell. See Bash - (Environment) Variable


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

Discover More
Windows Internet Properties Proxy
HTTP - Forward Proxy

A forward proxy is a proxy application that is configured to intercept and forward every internal Http request to an destination website, hence the name Forward Proxy. It's also known as man-in-the-middle...

LD_LIBRARY_PATH is a environment variable that lists directory where executable can search for linux shared library. It's also called the shared library search path. The value of the environment variable...
Linux - locale (LANG, LC environment variable)

Most UNIX systems use the LANG variable to specify the desired locale but you can use also the setlocale function. A locale defines the default encoding for the text file. To obtain the locale names...
Process States
Process / Thread - Environment Variable

environment variable of a process (Os, application,...) called also System variables. They are used mainly to configure the behavior of a process (installation, configuration, rule, ...) and are part...
SystemD - Environment Variable for a service

How to add environment to a service within SystemD where : ...

Share this page:
Follow us:
Task Runner