Back to Cheat SheetsTooling · Beginner

Linux cheat sheet

Shell commands for logs, processes, permissions and remote environments.

Files and logs

Tail a log

tail -f app.log

Search

grep -rn "NullPointer" logs/

Find files

find . -name "*.xml" -mtime -1

Disk usage

du -sh * | sort -h

Processes and network

Running processes

ps -ef | grep java

Kill

kill -9 <pid>

Port in use

lsof -i :8080

Remote copy

scp report.html user@host:/tmp/

Permissions

Change mode

chmod +x run.sh

Ownership

chown user:group file

Go beyond the reference

Book a free demo class and apply these commands on live project work.