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
Support ESM and CommonJS Uses of Your Library Read tip
Prune Docker Objects and Free up Space Read tip
Automatic Restart on System Reboot With PM2 Read tip