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.
Save with colours (recommended)#
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.
./linpeas.sh | tee linpeas.out
less -r linpeas.outSave 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.
./linpeas.sh -N > linpeas.txtIf 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.
./linpeas.sh -N > "linpeas-$(hostname)-$(date +%F).txt" # named by host + date
./linpeas.sh -N >> linpeas-history.txt # appendSaving 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.
./linpeas.sh -a -N > /dev/shm/linpeas.txt
less -r /dev/shm/linpeas.txtIf 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.
python3 peas2json.py linpeas.out linpeas.json
python3 json2html.py linpeas.json linpeas.html
python3 json2pdf.py linpeas.json linpeas.pdf # needs reportlabThe parsers live in the parsers/ folder of the PEASS-ng repository. json2pdf.py requires the reportlab Python package.
Handling sensitive output#
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.
rm -f linpeas.out linpeas.txt /dev/shm/linpeas.txtHow 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
- linPEAS README (Colors section) — colour legend
- PEASS-ng release — runtime legend verified against 20260908-dffb9496
- PEASS-ng parsers — JSON/HTML/PDF output tooling