1 .\" Copyright (C) 1994, 1995, Daniel Quinlan <quinlan@yggdrasil.com>
2 .\" Copyright (C) 2002-2008, 2017, Michael Kerrisk <mtk.manpages@gmail.com>
3 .\" Copyright (C) 2023, Alejandro Colomar <alx@kernel.org>
5 .\" SPDX-License-Identifier: GPL-3.0-or-later
7 .TH proc_pid_environ 5 (date) "Linux man-pages (unreleased)"
9 /proc/pid/environ \- initial environment
12 .IR /proc/ pid /environ
13 This file contains the initial environment that was set
14 when the currently executing program was started via
16 The entries are separated by null bytes (\[aq]\e0\[aq]),
17 and there may be a null byte at the end.
18 Thus, to print out the environment of process 1, you would do:
22 .RB "$" " cat /proc/1/environ | tr \[aq]\e000\[aq] \[aq]\en\[aq]"
28 the process modifies its environment
29 (e.g., by calling functions such as
36 reflect those changes.
38 Furthermore, a process may change the memory location that this file refers via
41 .BR PR_SET_MM_ENV_START .
43 Permission to access this file is governed by a ptrace access mode
44 .B PTRACE_MODE_READ_FSCREDS