Skip to content
IT_TOOLS_

/IT Cheatsheets

Fast, cross-platform command reference. Press '/' to search.

Local processing

This tool processes your input in your browser.

Command Palette

Search for a command to run...

Networking

Linux

Display the current IP routing table

ip route show
Linux

Display interface IP addresses

ip addr show
Linux

List all listening ports and their associated process IDs

ss -tulpn
Linux

Query specific DNS server for domain information

dig @8.8.8.8 example.com
Linux

Flush the systemd-resolved DNS cache

resolvectl flush-caches
Windows

Display the current IP routing table

route print
Windows

Display full TCP/IP configuration for all adapters

ipconfig /all
Windows

Query specific DNS server for domain information

nslookup example.com 8.8.8.8
Windows

Flush and reset the DNS client resolver cache

ipconfig /flushdns
Windows

Test network connectivity and specific port (PowerShell)

Test-NetConnection -ComputerName 8.8.8.8 -Port 53
Cisco

Display the current IP routing table

show ip route
Cisco

Display a brief summary of interface statuses and IP addresses

show ip interface brief
Cisco

Show the current active configuration

show running-config
Cisco

Save the running config to the startup config (NVRAM)

write memory
Cisco

Show the MAC address table of the switch

show mac address-table
Cisco

Show detailed information about directly connected Cisco devices

show cdp neighbors detail
MikroTik

Display the current IP routing table

ip route print
MikroTik

Display interface IP addresses

ip address print
MikroTik

Export the full configuration to a readable script file

export file=backup.rsc
FortiGate

Display the full IP routing table

get router info routing-table all

System Administration

Linux

Add an existing user to the sudo group

HIGH IMPACT: High-impact command. Verify the target, permissions and environment before running it.
usermod -aG sudo username
Linux

Recursively set directory permissions to rwxr-xr-x

chmod -R 755 /path/to/dir
Linux

Recursively change the owner and group of a directory

HIGH IMPACT: High-impact command. Verify the target, permissions and environment before running it.
chown -R user:group /path/to/dir
Linux

Find and delete log files older than 30 days

find /var/log -type f -name "*.log" -mtime +30 -exec rm {} \;
Linux

Find and delete empty directories

find . -type d -empty -delete
Linux

Interactive process viewer and system monitor

htop
Linux

Report file system disk space usage in human-readable format

df -h
Linux

Estimate file space usage for all files in current directory

du -sh *
Linux

View the end of the logs for a specific systemd service

journalctl -xeu service_name
Linux

Compress a folder into a gzip tarball

tar -czvf archive.tar.gz /path/to/folder
Windows

Show top 10 processes consuming the most CPU (PowerShell)

Get-Process | Sort-Object CPU -Descending | Select-Object -First 10
Windows

Get the 50 most recent security events (PowerShell)

Get-EventLog -LogName Security -Newest 50
Windows

Scan the integrity of all protected system files and replace incorrect versions

sfc /scannow
Windows

List all local users (PowerShell)

Get-LocalUser
Windows

Clear the DNS cache (PowerShell)

Clear-DnsClientCache
MikroTik

Show system resources (CPU, RAM, Uptime)

system resource print
FortiGate

Display general system status, firmware version, and uptime

get system status

Security

Linux

Allow incoming SSH traffic using UFW

HIGH IMPACT: High-impact command. Verify the target, permissions and environment before running it.
ufw allow 22/tcp
Linux

List all iptables rules with packet counts (no DNS resolution)

iptables -L -v -n
Linux

Find failed SSH login attempts

grep "Failed password" /var/log/auth.log
Cisco

Show all configured access lists and hit counts

show access-lists
MikroTik

Print firewall filter rules

ip firewall filter print
FortiGate

Capture packets (tcpdump equivalent) for a specific IP with high verbosity

diag sniffer packet any 'host 1.1.1.1' 4 0 l
FortiGate

Show all firewall policies

show firewall policy
Nmap

Aggressive, fast scan with OS detection, version detection, script scanning, and traceroute

nmap -A -T4 <ip>
Nmap

Scan all 65535 ports

nmap -p- <ip>
OpenSSL

View the contents of a PEM encoded certificate

openssl x509 -in cert.pem -text -noout
OpenSSL

Generate a new 2048-bit RSA private key

openssl genrsa -out private.key 2048

Containers

Docker

List all containers (running and stopped)

docker ps -a
Docker

Get an interactive shell inside a running container

docker exec -it <container_name> /bin/bash
Docker

Remove all unused containers, networks, images, and volumes

DESTRUCTIVE: Destructive command. Review the target, scope, backup and environment before running it.
docker system prune -a
Docker

Follow log output of a container

docker logs -f <container_name>
Docker

Build, (re)create, start, and detach for containers using docker-compose

docker compose up -d

Version Control

Git

View a visual tree of all branches and commits

git log --oneline --graph --decorate --all
Git

Discard all local changes in the working directory

DESTRUCTIVE: Destructive command. Review the target, scope, backup and environment before running it.
git reset --hard HEAD
Git

Remove all untracked files and directories

DESTRUCTIVE: Destructive command. Review the target, scope, backup and environment before running it.
git clean -fd
Git

Stash changes in a dirty working directory

git stash
Git

Create and switch to a new branch

git checkout -b <new-branch-name>

Kubernetes

Kubernetes

List all pods in all namespaces

kubectl get pods --all-namespaces
Kubernetes

Tail the logs for a specific pod

kubectl logs -f <pod-name>