Quick answer

To save LinPEAS output with colours, run ./linpeas.sh | tee linpeas.out and read it back with less -r linpeas.out. For a plain-text report, disable colours: ./linpeas.sh -N > linpeas.txt. On locked-down hosts, write to /dev/shm instead of a noexec path.

LinPEAS colours are ANSI escape codes. tee writes them to a file while still showing them on screen; less -r renders them when you read the file back.

Save and re-read with colours
./linpeas.sh | tee linpeas.out
less -r linpeas.out

Save as plain text (no colours)#

For a report you will paste elsewhere or feed to another tool, turn colours off with -N so the file contains no escape codes.

Plain-text output with -N
./linpeas.sh -N > linpeas.txt
Note

If you saved without -N and then open the file in a text editor, you will see raw codes like ^[[1;31m. That is normal — read it with less -r, or re-run with -N for clean text.

Append, timestamp, or name by host#

Keep runs separate with a timestamped filename, or append to an existing log.

Timestamped and appended output
./linpeas.sh -N > "linpeas-$(hostname)-$(date +%F).txt"   # named by host + date
./linpeas.sh -N >> linpeas-history.txt                      # append

Saving on restricted hosts#

Some hardened systems mount /tmp as noexec or give you few writable paths. A memory-backed filesystem like /dev/shm is usually writable and a good place for output during an authorised audit.

Write output to /dev/shm
./linpeas.sh -a -N > /dev/shm/linpeas.txt
less -r /dev/shm/linpeas.txt

If you also hit “permission denied” running the script itself, see the troubleshooting guide.

Convert the output to HTML or PDF#

PEASS-ng ships parsers that turn saved output into a JSON structure and then into a readable HTML or PDF report — handy for engagement deliverables.

Convert saved output with the PEASS-ng parsers
python3 peas2json.py linpeas.out linpeas.json
python3 json2html.py linpeas.json linpeas.html
python3 json2pdf.py  linpeas.json linpeas.pdf   # needs reportlab
Note

The parsers live in the parsers/ folder of the PEASS-ng repository. json2pdf.py requires the reportlab Python package.

Handling sensitive output#

Output can contain secrets

Saved output can contain hostnames, usernames and — especially with -r — snippets of credentials. Treat the file as sensitive: store it only where your rules of engagement allow, redact secrets before sharing, and delete it from the target when the authorised audit ends.

Clean up saved output afterwards
rm -f linpeas.out linpeas.txt /dev/shm/linpeas.txt
How do I keep the colours when I save LinPEAS output?

Pipe through tee (./linpeas.sh | tee linpeas.out) and read it back with less -r linpeas.out. tee saves while still printing to screen.

Why is my saved LinPEAS file full of ^[[ codes?

Those are ANSI colour escape codes saved to a plain file. Read the file with less -r, or re-run with -N to save without colours.

How do I save output to both the screen and a file at once?

Use tee: ./linpeas.sh | tee linpeas.out. It writes to the file and the terminal simultaneously.

Where should I save output on a CTF or hardened box?

/dev/shm is usually writable even when /tmp is noexec: ./linpeas.sh -N > /dev/shm/linpeas.txt. Remove it when you are done.

Sources & references

  1. linPEAS README (Colors section) — colour legend
  2. PEASS-ng release — runtime legend verified against 20260908-dffb9496
  3. PEASS-ng parsers — JSON/HTML/PDF output tooling