PENV(1)

πŸ“¦
version 0.2.23 Β· 4 versions
, in fedora 44

πŸ’– PENV(1) β€” the manual page bestie πŸ’–

okay so you found yourself in section 1 of the General Commands Manual, and the star of the show is penv. Let's get into it 🫢


✨ NAME ✨

penv β€” print process environment variables


πŸŽ€ SYNOPSIS πŸŽ€

penv [pid | core]...

🌸 DESCRIPTION 🌸

So basically, penv peeks at a target process or a process core file and prints out all the environment variables and their values. That's it, that's the whole vibe ✨

For live processes, the environment gets read straight out of process memory via the environ symbol, which means it reflects the current state β€” including anything that got added or changed at runtime with setenv(3) or putenv(3). lowkey iconic.

This is very different from /proc/pid/environ, which is a static snapshot captured at process start. That one's frozen in time, no cap 🧊

Also worth knowing: this command is equivalent to running pargs(1) with the -e option. iykyk πŸ’…


πŸ¦‹ OPERANDS πŸ¦‹

  • pid β€” Process ID list. You can also pass a /proc/pid path instead, which means shell expansions like /proc/* work and let you target every process on the system at once. slay πŸŽ€
  • core β€” Process core file, as produced by systemd-coredump(8), or an Ubuntu/Debian apport .crash file. For systemd core files, the file genuinely does not need to exist on disk β€” if it's been removed, the corresponding systemd journal entry gets used instead. See NOTES below πŸ‘€

πŸ’… EXIT STATUS πŸ’…

  • 0 on success ✨
  • non-zero if an error occurs β€” like no such process, permission denied, or an invalid option 😭

🌈 FILES 🌈

  • /proc/pid/* β€” Process information and control files.

🧚 NOTES 🧚

When a core file has been removed by systemd-tmpfiles(8) or by storage limits configured in coredump.conf(5), the systemd-coredump(8) journal entry for the crash may still be hanging around. In that case, the path to the deleted core file can be passed as the core operand even though the file no longer exists on disk, and process metadata will be retrieved from the journal entry instead. no file, no problem πŸ’€

Use coredumpctl(1) to get the path of a missing core file, like:

coredumpctl list <name> -F COREDUMP_FILENAME

Ubuntu/Debian apport .crash files are also supported πŸ“ These files use Debian control syntax with base64-encoded gzip core dumps. Text fields β€” such as ProcCmdline, ProcEnviron, and ExecutablePath β€” are mapped to COREDUMP_* fields, and the core dump is extracted on first access. the way it just… does that πŸ˜­πŸ‘‘


πŸ‘‘ SEE ALSO πŸ‘‘

pargs(1), pauxv(1), coredumpctl(1), environ(7), proc(5)


and that's the whole page bestie πŸ’– this was penv 0.2.23, dated September 2026 β€” go forth and inspect those environments, main character energy only πŸŒŸπŸ’œ

πŸ“¦ where this page comes from