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
A Better Minimum Compression Size in Nginx Read tip
Restrict SSH Key to Specific Commands Read tip
Easily Test Your .htaccess Rewrite Rules Read tip