How to display /proc/*/environ file in separate lines?

environ is a file located in /proc/PID/environ, it shows environment variables for a process.

If you run “cat environ”, you will get a long string.

linux proc evviron file

To make it readable, you can use sed command.

cat environ | sed -z 's/$/\n/'

Example

linux procs environ display with sed

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *