proc_pid_environ(5) — Linux manual page
proc_pid_environ(5) File Formats Manual proc_pid_environ(5)
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). 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), the process modifies its
environment (e.g., by calling functions such as putenv(3)
or modifying the environ(7) variable directly), this file
will not reflect those changes.
Furthermore, a process may change the memory location that
this file refers via prctl(2) 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).
SEE ALSO
proc(5)
COLOPHON
This page is part of the man-pages (Linux kernel and C library
user-space interface documentation) project. Information about
the project can be found at
⟨https://www.kernel.org/doc/man-pages/⟩. If you have a bug report
for this manual page, see
⟨https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/CONTRIBUTING⟩.
This page was obtained from the tarball man-pages-6.9.1.tar.gz
fetched from
⟨https://mirrors.edge.kernel.org/pub/linux/docs/man-pages/⟩ on
2024-06-26. If you discover any rendering problems in this HTML
version of the page, or you believe there is a better or more up-
to-date source for the page, or you have corrections or
improvements to the information in this COLOPHON (which is not
part of the original manual page), send a mail to
man-pages@man7.org