Skip to main content

Environment Variable Reference

v1.0.0

Browse common environment variables for POSIX, Windows, Node.js, Python, Docker, and CI/CD.

51 variables found

PATHLinux/macOS

Colon-separated list of directories searched for executable commands.

PATH=/usr/local/bin:/usr/bin:/bin:/sbin
HOMELinux/macOS

Path to the current user's home directory.

HOME=/home/username
USERLinux/macOS

Name of the currently logged in user.

USER=john
SHELLLinux/macOS

Path to the current user's login shell.

SHELL=/bin/bash
LANGLinux/macOS

Default locale for the user environment (language + character encoding).

LANG=en_US.UTF-8
TERMLinux/macOS

Terminal type. Used by ncurses apps to format output correctly.

TERM=xterm-256color
DISPLAYLinux/macOS

X Window System display to use. Required for GUI apps in X11.

DISPLAY=:0
TMPDIRLinux/macOS

Directory for temporary files. Falls back to /tmp if unset.

TMPDIR=/tmp
PWDLinux/macOS

Current working directory (updated by cd).

PWD=/home/user/projects
OLDPWDLinux/macOS

Previous working directory. Used by 'cd -'.

OLDPWD=/home/user
HOSTNAMELinux/macOS

Name of the current host machine.

HOSTNAME=myserver.example.com
EDITORLinux/macOS

Preferred text editor. Used by git commit, crontab -e, etc.

EDITOR=vim
PAGERLinux/macOS

Preferred pager program for scrollable output.

PAGER=less
SSH_AUTH_SOCKLinux/macOS

Path to the SSH agent socket for key-based authentication.

SSH_AUTH_SOCK=/run/user/1000/ssh-agent.socket
LD_LIBRARY_PATHLinux/macOS

Colon-separated paths searched for shared libraries before system paths.

LD_LIBRARY_PATH=/usr/local/lib:/opt/custom/lib
XDG_CONFIG_HOMELinux/macOS

User-specific configuration files base directory.

XDG_CONFIG_HOME=/home/user/.config

Default: $HOME/.config

PathWindows

Semicolon-separated list of directories searched for executable commands.

Path=C:\Windows\System32;C:\Program Files\...;
APPDATAWindows

Roaming application data folder for the current user.

APPDATA=C:\Users\John\AppData\Roaming
LOCALAPPDATAWindows

Non-roaming application data folder for the current user.

LOCALAPPDATA=C:\Users\John\AppData\Local
TEMPWindows

Directory for temporary files.

TEMP=C:\Users\John\AppData\Local\Temp
USERNAMEWindows

Name of the currently logged in user.

USERNAME=John
USERPROFILEWindows

Path to the current user's profile folder.

USERPROFILE=C:\Users\John
COMPUTERNAMEWindows

NetBIOS name of the current computer.

COMPUTERNAME=DESKTOP-ABC123
SystemRootWindows

Path to the Windows system directory.

SystemRoot=C:\Windows

Default: C:\Windows

PROGRAMFILESWindows

Path to the Program Files directory.

PROGRAMFILES=C:\Program Files
WINDIRWindows

Path to the Windows installation directory (same as SystemRoot).

WINDIR=C:\Windows
PATHEXTWindows

Executable file extensions searched in PATH.

PATHEXT=.COM;.EXE;.BAT;.CMD

Default: .COM;.EXE;.BAT;.CMD;.VBS;.PS1

NODE_ENVNode.js

Application environment. Convention: development | test | production.

NODE_ENV=production
PORTNode.js

TCP port for the server to listen on. Read by most Node.js server frameworks.

PORT=3000

Default: 3000

NODE_PATHNode.js

Colon-separated paths for module resolution (legacy — prefer node_modules).

NODE_PATH=/usr/lib/node_modules
NODE_OPTIONSNode.js

Default command-line options passed to the Node.js process.

NODE_OPTIONS=--max-old-space-size=4096
npm_package_versionNode.js

Package version from package.json. Automatically set by npm scripts.

npm_package_version=1.0.0
npm_config_prefixNode.js

Global npm prefix directory for global package installs.

npm_config_prefix=/usr/local
PYTHONPATHPython

Colon-separated directories added to sys.path for module imports.

PYTHONPATH=/home/user/project/src
PYTHONHOMEPython

Location of the Python standard library.

PYTHONHOME=/usr/local/lib/python3.12
VIRTUAL_ENVPython

Set when a virtual environment is active. Contains the venv path.

VIRTUAL_ENV=/home/user/project/.venv
PYTHONDONTWRITEBYTECODEPython

If set, Python won't write .pyc bytecode files.

PYTHONDONTWRITEBYTECODE=1
PYTHONUNBUFFEREDPython

Force stdout/stderr streams to be unbuffered. Useful for Docker logs.

PYTHONUNBUFFERED=1
PIP_NO_CACHE_DIRPython

Disable pip's download cache. Useful in Docker images to reduce size.

PIP_NO_CACHE_DIR=1
DOCKER_HOSTDocker

Socket or TCP address of the Docker daemon.

DOCKER_HOST=unix:///var/run/docker.sock
DOCKER_BUILDKITDocker

Enable BuildKit for faster, more efficient Docker builds.

DOCKER_BUILDKIT=1

Default: 0

DOCKER_TLS_VERIFYDocker

Enable TLS verification for Docker daemon connection.

DOCKER_TLS_VERIFY=1
COMPOSE_FILEDocker

Path to the Docker Compose file.

COMPOSE_FILE=docker-compose.prod.yml

Default: docker-compose.yml

COMPOSE_PROJECT_NAMEDocker

Project name prefix for Docker Compose containers and volumes.

COMPOSE_PROJECT_NAME=myapp
CICI/CD

Set to 'true' or '1' in most CI environments. Enables CI-specific behaviour.

CI=true

Default: true

GITHUB_ACTIONCI/CD

Name of the currently running GitHub Actions action.

GITHUB_ACTION=build-and-test
GITHUB_ACTORCI/CD

Username of the person or app that triggered the GitHub Actions workflow.

GITHUB_ACTOR=octocat
GITHUB_REFCI/CD

Full Git ref (branch or tag) that triggered the GitHub Actions workflow.

GITHUB_REF=refs/heads/main
GITHUB_SHACI/CD

The commit SHA that triggered the GitHub Actions workflow.

GITHUB_SHA=a1b2c3d4e5f6...
GITLAB_CICI/CD

Set to 'true' in all GitLab CI/CD pipelines.

GITLAB_CI=true
JENKINS_URLCI/CD

URL of the Jenkins instance running the current build.

JENKINS_URL=https://jenkins.example.com/