Skip to content

Get Process Environment From Terminal

View on Twitter

💡 How do you get the ENV vars of a running Node.js (or any) process?

➡️ cat /proc/$PID/environ | tr '\0' '\n'

Prints out the initial environment of the process.

Get the ENV vars of a running process with cat /proc/$PID/environ | tr '0' '
'.

Download the VPS Security Cheatsheet

Use this FREE security cheatsheet to not miss a step when securing your VPS.

A preview of the VPS Security Cheatsheet.

You'll also get tips on building scalable Node.js applications about twice a month. I respect your email privacy. Unsubscribe any time.

You might also like
How to Wait or Pause in Node.js Read tip
IaaS vs PaaS Explained Using a Store Analogy Read tip
Debug Srcset and Sizes Attributes in Images Read tip