---
name: "proc_pid_environ"
section: "5"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/proc_pid_environ"
---

# proc\_pid\_environ(5)

initial environment

## NAME

/proc/pid/environ - initial environment

## DESCRIPTION

- */proc/*pid*/environ*

  This file contains the initial environment that was set when the currently executing program was started via [**execve**(2)](/execve/2.md). The entries are separated by null bytes ('\\0'), and there may be a null byte at the end. Thus, to print out the environment of process 1, you would do:

-

  ```
  $ cat /proc/1/environ | tr '\000' '\n'
  ```

-

  If, after an [**execve**(2)](/execve/2.md), the process modifies its environment (e.g., by calling functions such as [**putenv**(3)](/putenv/3.md) or modifying the [**environ**(7)](/environ/7.md) variable directly), this file will *not* reflect those changes.

-

  Furthermore, a process may change the memory location that this file refers via [**prctl**(2)](/prctl/2.md) operations such as **PR\_SET\_MM\_ENV\_START**.

-

  Permission to access this file is governed by a ptrace access mode **PTRACE\_MODE\_READ\_FSCREDS** check; see [**ptrace**(2)](/ptrace/2.md).

## SEE ALSO

[**proc**(5)](/proc/5.md)
