Repository navigation
Linux Command Cheat Sheet and Reference Debian Based
Reference index and audit status: Reviewed cheat sheets and references. For find, grep, curl, rsync, GnuPG and Docker quick commands, see the CLI Field Cheat Sheet.
Important
Reviewed October 31, 2026. These commands depend on the distribution version, actual hardware, privileges and package availability; do not paste large installation blocks without checking their changes. Debian 12+/recent Ubuntu often implement externally managed Python environments: prefer system packages, pipx for applications or python3 -m venv for projects, not global pip3 install. See Arch reference, network reference, and Wireshark capture and filter reference.
This document serves as a quick reference for common system administration, networking, security auditing, and hardware hacking commands on Debian/Ubuntu-based systems. It covers both bare-metal/VM Linux and WSL2 (Windows Subsystem for Linux) environments, including the differences between them.
General-purpose Linux command reference spanning package management (Arch/pacman and Debian/apt), diagnostics, wireless adapter setup, fresh-install tool bundles, and a full bare-metal-vs-WSL2 comparison for hardware hacking work. Distinct from blackarch.md and/or ArchLinux_CheatSheet.md (BlackArch/Arch-specific first-boot sequences) in that this file is a general Debian reference, not a single distro's post-install checklist.
Fifteen numbered sections moving from basic sysadmin commands through package repair, storage, networking/wireless, fresh-install one-liners, and a dedicated WSL2 section (12) that flags exactly what does and doesn't work under WSL (monitor mode, DKMS drivers, GPU passthrough) versus bare-metal Linux. Section 13 doubles as a tool-purpose glossary for everything installed in Section 11's one-liners. Section 15 is a condensed OSINT tool quick-reference - for full methodology see OSINT/OSINT_GUIDE.md and OSINT/OSINT_CHEATSHEET.md.
Get a fresh Debian/Ubuntu, Arch, or WSL2 environment fully provisioned for security/hardware-hacking work in one pass, and know in advance which hardware-hacking capabilities (monitor mode, DKMS, live USB device access) will or won't work under WSL2 before wasting time troubleshooting.
- Provisioning a new Linux VM, bare-metal box, or WSL2 distro for security/hardware work
- Deciding whether a given hardware-hacking task needs bare-metal Linux instead of WSL2 (Section 12.1's capability table)
- Quick command lookup for package management, wireless adapter setup, or the OSINT tool quick-reference (Section 15)
Arch Linux: Unlike Debian based Linux, in Arch apt is replaced by pacman (standard repositories) and pamac (Manjaro's native package manager with Arch User Repository / AUR support). Arch's killer feature is the AUR or the Arch User Repository. Instead of hunting down PPAs, users can use an AUR helper (like Manjaro's pamac, or terminal tools like yay and paru to automatically compile and install virtually any Linux software in existence directly from source scripts!
| Command | Purpose | Explanation |
|---|---|---|
sudo pacman -Syu |
System Update | Synchronizes repositories and updates all installed packages. Always do this before testing. |
sudo pacman -S [pkg] |
Install Package | Basic command to install a software package from the official Manjaro repos. |
sudo pacman -Rns [pkg] |
Remove Package Cleanly | Removes the package, its configuration files, and any unneeded dependencies. |
pacman -Qdt |
List Orphans | Lists packages installed as dependencies that are no longer needed. |
sudo pacman -Sc |
Clean Cache | Clears out the local cache of downloaded package files. |
pamac build [pkg] |
Install from AUR | Builds and installs a community package from the Arch User Repository (e.g., proprietary benchmarks). |
Debian Linux maintains massive, heavily vetted official repositories. If a piece of software isn't in the official repos (short for repositories), check package availability and distribution support before adding any third-party repositories or PPAs (Personal Package Archives). Debian Linux uses apt for its package installation and management. For a graphical interface, users can also use the Synaptic Package Manager to easily find and install applications on their system.
| Command | Purpose | Explanation |
|---|---|---|
ssh-keygen -R 192.168.0.1 |
Remove SSH Key | Removes the host key for the specified IP from your known_hosts file. Do this only after independently confirming the changed remote SSH host-key fingerprint. |
sudo chmod u+x my_script.sh |
Allow Execution | Adds the execute permission (+x) for the user (u+) who owns the file, making a script runnable. |
chmod 644 path/to/file |
File Permissions | Owner can read/write; Group/Others can only read (standard file permission). |
chmod 755 path/to/script-or-dir |
Script/Directory Permissions | Owner can read/write/execute; Group/Others can read/execute (standard directory/script permission). |
| Command | Purpose | Explanation |
|---|---|---|
sudo apt --fix-broken install |
Fix Broken Dependencies | Attempts to correct a system where packages have unmet dependencies. |
sudo apt remove [package_name] |
Remove Package | Basic command to uninstall a specified package (requires a package name). |
sudo apt autoremove |
Review removable dependencies | Examine the proposed removals and confirm before proceeding; avoid automatic confirmation in a recovery scenario. |
sudo apt clean |
Clean Package Cache | Clears out the local repository of retrieved package files. |
| Command | Purpose | Explanation |
|---|---|---|
ls -la /usr/folder1/folder2/ |
Check Files/Folders |
Lists all (-a) files in the path with long format details (-l). |
lsblk |
List Disks | Lists all block devices (drives and partitions) on the system. |
lsusb |
List USB Devices | Lists USB devices connected to the system. |
lspci |
List PCI Devices | Lists PCI buses and devices. |
lshw |
Hardware Info | Lists detailed hardware configuration of the machine. |
dmesg | tail -n 50 |
Kernel Messages | Shows the last 50 kernel ring buffer messages (great for USB/hardware issues). |
free -h |
Memory Usage | Displays free, used, and total system memory and swap space in a human-readable format. |
sudo iftop |
Network Traffic (General) | Displays network bandwidth usage on an interface in real-time. |
sudo nethogs |
Network Traffic (Per Process) | Displays which process/program is using the most network bandwidth. |
ncdu |
Disk Usage | An interactive ncurses utility for visualizing disk space usage. |
htop |
Process Viewer | An interactive, improved version of the top command for monitoring processes and resources. |
btop |
Modern Monitor | A feature-rich, visually appealing resource monitor. |
| Command | Purpose | Explanation |
|---|---|---|
sudo mount -t exfat /dev/sdXN /mnt/your_mount_point |
Mount ExFAT Drive | Mounts an ExFAT-formatted drive to the specified mount point. Replace sdXN with actual device (e.g., sdb1). |
sudo umount /mnt/your_mount_point |
Unmount Drive | Safely unmounts the drive at the specified mount point. |
lsblk -f |
Filesystem Info | Lists block devices with filesystem type, label, and UUID. |
sudo blkid |
Get Drive UUIDs | Locates and prints block device attributes (used for /etc/fstab entries). |
| Command | Purpose | Explanation |
|---|---|---|
ip a |
View IP Addresses | Displays address information for all network interfaces (modern replacement for ifconfig). |
ifconfig |
Network Config (Legacy) | Older command to display/configure network interfaces. |
iw dev |
Wireless Info | Shows detailed information about wireless devices. |
sudo iwconfig |
Wireless Config | Displays/sets basic wireless interface parameters. |
sudo ip link set wlan1 down |
Disable Interface | Brings down the specified wireless interface. |
sudo ip link set wlan1 name wlan1mon |
Rename Interface only | Changing an interface name does not enable monitor mode. Monitor mode requires a supported driver and explicit interface-type configuration. |
airmon-ng |
Monitor Mode | Puts a wireless card into monitor mode for security auditing. |
sudo arp-scan -l |
ARP Scan | Scans the local network segment using ARP packets to discover active hosts. |
ARP Scan Usage Example:
cd /tmp/
sudo arp-scan -lNote: Wireless monitor mode and packet injection require bare-metal Linux or a passed-through USB Wi-Fi adapter - they do not work natively in WSL (no kernel Wi-Fi stack access).
This covers installing the rtl88xxau or rtl8812au driver, often needed for high-power Wi-Fi adapters.
Option 1: Apt Repository (DKMS)
sudo apt install realtek-rtl88xxau-dkmsOption 2: Compile from Source (for rtl8812au)
sudo apt install git dkms build-essential
git clone https://github.com/aircrack-ng/rtl8812au.git
cd rtl8812au
sudo make dkms_installWSL Note: DKMS drivers do not install into the WSL kernel. For Wi-Fi adapter work, use bare-metal Linux or boot from a Kali/Parrot live USB.
| Command | Purpose | Explanation |
|---|---|---|
systemctl reboot -i |
Reboot System | Initiates a system reboot. |
sudo systemctl [command] [service] |
Manage Services | Standard format to control system services (e.g., start, stop, status, enable, disable). |
sudo systemctl disable hciuart.service |
Disable Bluetooth Console | Stops the service managing serial communications for the onboard Bluetooth chip (common on Raspberry Pi). |
sudo systemctl disable avahi-daemon.socket avahi-daemon.service |
Disable Avahi | Disables the Zeroconf/mDNS daemon used for local network discovery. |
sudo journalctl -u [service] -f |
Follow Service Logs | Tail the systemd journal for a specific service in real-time. |
| Command | Purpose | Explanation |
|---|---|---|
sudo apt install -y usbmount |
Auto-Mount USB | Installs utility to automatically mount USB drives upon insertion. |
sudo apt install -y samba samba-common-bin |
Install Samba | Installs the core components for Windows/Linux file sharing. |
sudo tail -f /var/log/samba/log.smbd |
Monitor Samba Log | Displays the log file and follows it (-f) for real-time troubleshooting. |
smbclient -L //hostname -U user |
List Shares | Lists available SMB shares on a remote host. |
| Command | Purpose | Explanation |
|---|---|---|
sudo apt remove -y triggerhappy dphys-swapfile plymouth |
Remove Apps | Uninstalls the specified packages. Often used to remove resource-intensive or unnecessary components: triggerhappy (hotkey daemon), dphys-swapfile (swap management), and plymouth (boot splash screen). |
| Command | Purpose | Explanation |
|---|---|---|
sudo apt install stress-ng sysbench |
Install Stress Tools | Installs utilities to generate system load for testing stability. |
stress-ng --cpu 4 --timeout 300s |
CPU Stress Test | Puts a high load on 4 CPU cores for 300 seconds (5 minutes). |
watch -n 1 vcgencmd measure_temp |
Monitor Temperature (Pi) | Runs the temperature command every 1 second (-n 1) to monitor heat output in real-time (Raspberry Pi). |
sensors |
Monitor Temperature (x86) | Reads on-board temp sensors via lm-sensors (run sudo sensors-detect first). |
This section is for standard Linux installs - desktops, servers, VMs, LXC containers, Raspberry Pi, etc. - not WSL. For WSL, see Section 12.
This script installs a comprehensive suite of development, network, and security tools.
sudo apt update && sudo apt upgrade -y && \
sudo apt install -y \
linux-cpupower screen tmux git git-lfs nano vim python3 python3-pip python3-venv \
python3-requests python3-yaml python3-tk python3-psutil pipx \
wget curl jq unzip zip rsync tree expect build-essential pkg-config cmake \
dnsutils net-tools arp-scan iftop iotop lm-sensors sysstat smartmontools \
nmap mtr traceroute whois iperf3 tcpdump ncat netcat-traditional ethtool \
aircrack-ng reaver hashcat hydra netdiscover wifite \
samba cifs-utils smbclient nfs-common sshfs rclone \
vnstat glances fail2ban logrotate \
ncdu htop btop lshw lsof parted \
psmisc moreutils figlet lolcat screenfetch \
avahi-daemonAlternative minimal install for screen/tmux:
sudo apt-get install screen tmuxThis adds USB serial tools, microcontroller flashers, SDR utilities, reverse engineering tools, logic analyzers, and Bluetooth hardware support. Bare-metal Linux has full access to USB devices, kernel modules, and Wi-Fi monitor mode - none of the WSL workarounds in Section 12 are needed.
sudo apt update && \
sudo apt install -y \
build-essential cmake ninja-build pkg-config autoconf automake libtool \
clang gdb \
ripgrep fd-find fzf bat eza zoxide direnv \
tio minicom picocom usbutils pciutils setserial socat usbip \
avrdude dfu-util stm32flash openocd flashrom \
hackrf libhackrf-dev rtl-sdr librtlsdr-dev \
gnuradio gr-osmosdr gqrx-sdr inspectrum multimon-ng \
libfftw3-dev \
binwalk radare2 squashfs-tools cpio cabextract \
qemu-user-static binfmt-support \
sigrok-cli pulseview wireshark tshark \
ubertooth bluez bluez-tools \
xxd p7zip-full \
gh pandoc imagemagick ffmpegAdd yourself to device groups (one-time, then log out and back in):
sudo usermod -aG plugdev,dialout,wireshark,tty,uucp $USERThese tools are not in apt or are too out-of-date there. Install in user space:
pipx ensurepath && \
pipx install platformio && \
pipx install esptool && \
pipx install urh && \
pipx install meshtastic && \
pipx install rns && \
pipx install nomadnet && \
pipx install lxmf && \
pipx install unblob && \
pipx install rfcat && \
# Review the current uv installation instructions at https://docs.astral.sh/uv/getting-started/installation/ and inspect the chosen installer rather than piping it into a shellkalibrate-hackrf - clock calibration for HackRF (not packaged):
mkdir -p ~/tools && cd ~/tools
git clone https://github.com/scateu/kalibrate-hackrf
cd kalibrate-hackrf && ./bootstrap && ./configure && make && sudo make installarduino-cli - official installer:
# Consult https://arduino.github.io/arduino-cli/latest/installation/ and verify the installer/version before executingGhidra - manual download (needs JDK 17+):
sudo apt install -y openjdk-17-jdk
# Download latest from: https://github.com/NationalSecurityAgency/ghidra/releasesWSL2 has some critical differences from bare-metal Linux that affect hardware hacking workflows. This section covers the Windows-side prerequisites, WSL configuration changes, and the corrected install commands that account for what does and doesn't work under WSL.
| Capability | Bare-Metal Linux | WSL2 |
|---|---|---|
| USB device access | Native | Requires usbipd-win passthrough |
| Wi-Fi monitor mode / injection | โ Works | โ Not supported |
| Bluetooth (built-in) | โ Works | โ Use Ubertooth via usbipd |
linux-cpupower |
โ Works | โ No CPU freq interface in WSL kernel |
| DKMS Wi-Fi drivers (rtl8812au) | โ Works | โ WSL kernel is custom |
| systemd | โ Default | /etc/wsl.conf
|
| GUI apps (PulseView, Gqrx) | โ Native | โ Via WSLg (Win11/recent Win10) |
| GPU passthrough (hashcat) | โ Native |
Install usbipd-win from an admin PowerShell:
winget install --interactive --exact dorssel.usbipd-winThis is non-negotiable for hardware work. Without it, no Flipper, HackRF, RTL-SDR, Ubertooth, ESP board, FTDI adapter, or J-Link can be seen by WSL.
USB passthrough workflow (run in PowerShell as admin):
usbipd list
usbipd bind --busid <BUSID> # one-time per device
usbipd attach --wsl --busid <BUSID> # each time you want to use it
usbipd detach --busid <BUSID> # to releasesystemd is required for udev rules to fire properly - without it, HackRF, Ubertooth, RTL-SDR, and most USB tools demand sudo for everything.
sudo tee /etc/wsl.conf > /dev/null <<'EOF'
[boot]
systemd=true
[interop]
appendWindowsPath=true
EOFThen from PowerShell: wsl --shutdown, and reopen your WSL terminal.
This is the bare-metal one-liner from Section 11.1, adjusted for WSL:
-
linux-cpupowerremoved (no kernel support) -
wifiteremoved (no Wi-Fi monitor mode)
sudo apt update && sudo apt upgrade -y && \
sudo apt install -y \
screen tmux git git-lfs nano vim python3 python3-pip python3-venv \
python3-requests python3-yaml python3-tk python3-psutil pipx \
wget curl jq unzip zip rsync tree expect build-essential pkg-config cmake \
dnsutils net-tools arp-scan iftop iotop sysstat smartmontools \
nmap mtr traceroute whois iperf3 tcpdump ncat netcat-traditional ethtool \
aircrack-ng reaver hashcat hydra netdiscover \
samba cifs-utils smbclient nfs-common sshfs rclone \
vnstat glances fail2ban logrotate \
ncdu htop btop lshw lsof parted \
psmisc moreutils figlet lolcat screenfetchNote:
aircrack-ngandhashcatinstall fine and are useful for working with capture files (.pcap,.hccapx) - they just can't capture live traffic without a passed-through Wi-Fi adapter.
This is the bare-metal hardware add-on from Section 11.2, adjusted for WSL:
-
usbipreplaced withlinux-tools-generic(the userspace client now ships there) -
rfcatandkalibrate-hackrfmoved to pipx/source builds (not in apt)
sudo apt update && \
sudo apt install -y \
build-essential cmake ninja-build pkg-config autoconf automake libtool \
clang gdb \
ripgrep fd-find fzf bat eza zoxide direnv \
tio minicom picocom usbutils pciutils setserial socat \
avrdude dfu-util stm32flash openocd flashrom \
hackrf libhackrf-dev rtl-sdr librtlsdr-dev \
gnuradio gr-osmosdr gqrx-sdr inspectrum multimon-ng \
libfftw3-dev \
binwalk radare2 squashfs-tools cpio cabextract \
qemu-user-static binfmt-support \
sigrok-cli pulseview wireshark tshark \
ubertooth bluez bluez-tools \
xxd p7zip-full \
gh pandoc imagemagick ffmpeg \
linux-tools-generic hwdataAdd yourself to device groups:
sudo usermod -aG plugdev,dialout,wireshark,tty,uucp $USERThe usbip binary lives in a kernel-version-specific path. Register it as an alternative:
sudo update-alternatives --install /usr/local/bin/usbip usbip \
$(ls /usr/lib/linux-tools/*/usbip | tail -n1) 20Most of the time you won't need this -
usbipd attach --wslfrom the Windows side handles the Linux end automatically. Only needed if attaching to a remoteusbipdhost manually.
Same as bare-metal - these are user-space and work identically:
pipx ensurepath && \
pipx install platformio && \
pipx install esptool && \
pipx install urh && \
pipx install meshtastic && \
pipx install rns && \
pipx install nomadnet && \
pipx install lxmf && \
pipx install unblob && \
pipx install rfcat && \
# Review the current uv installation instructions at https://docs.astral.sh/uv/getting-started/installation/ and inspect the chosen installer rather than piping it into a shellkalibrate-hackrf (not packaged):
mkdir -p ~/tools && cd ~/tools
git clone https://github.com/scateu/kalibrate-hackrf
cd kalibrate-hackrf && ./bootstrap && ./configure && make && sudo make installarduino-cli and Ghidra install identically to the bare-metal instructions in Section 11.4.
Quick descriptions of what each tool does, organized by category.
| Tool | Purpose |
|---|---|
tio |
Modern serial terminal - autoconnect, logging, hex mode, dead simple. Recommended default. |
minicom |
Classic serial terminal, menu-driven config. |
picocom |
Lightweight terminal, scriptable. |
screen |
Doubles as a serial terminal: screen /dev/ttyUSB0 115200. |
socat |
Tunnel serial over network, create virtual serial pairs, bridge protocols. |
usbutils |
Provides lsusb for enumerating USB devices. |
setserial |
Configure serial port parameters (latency, baud rate aliases). |
| Tool | Purpose |
|---|---|
platformio |
All-in-one toolchain: ESP32, ESP8266, AVR, STM32, RP2040, nRF, etc. Integrates with VSCode. |
arduino-cli |
Official Arduino CLI - sketches, libraries, board management. |
esptool.py |
ESP32 / ESP8266 flashing, fuse reading, security operations. |
avrdude |
AVR / ATmega / ATtiny flashing with USBasp, AVRISP, Arduino-as-ISP. |
dfu-util |
USB DFU mode flashing (STM32, many bootloaders). |
stm32flash |
STM32 UART/I2C bootloader flashing. |
openocd |
JTAG / SWD debugging - works with ST-Link, J-Link, CMSIS-DAP, FT2232. |
flashrom |
SPI flash chip read/write - BIOS dumps, router firmware extraction (CH341A, Bus Pirate, FT2232). |
picotool |
RP2040 (Pico) inspection and flashing utility. |
| Tool | Purpose |
|---|---|
hackrf |
HackRF One control - hackrf_info, hackrf_transfer, hackrf_sweep. |
rtl-sdr |
RTL2832U-based dongles - rtl_sdr, rtl_fm, rtl_433, rtl_tcp. |
gnuradio |
Visual signal processing flowgraphs (GNU Radio Companion). |
gr-osmosdr |
GNU Radio source/sink for HackRF, RTL-SDR, BladeRF, etc. |
gqrx-sdr |
GUI spectrum analyzer / receiver. Needs WSLg under WSL. |
inspectrum |
Burst analysis and demodulation visualization. |
urh |
Universal Radio Hacker - sub-GHz protocol reverse engineering, OOK/FSK decoding. |
rfcat |
Yard Stick One / IM-Me control library. |
multimon-ng |
Decode POCSAG, FLEX, AFSK, DTMF, AX.25 from audio streams. |
kalibrate-hackrf |
GSM-based clock calibration for HackRF. |
| Tool | Purpose |
|---|---|
binwalk |
Firmware signature scanning and extraction. |
unblob |
Modern firmware unpacker - generally faster and more accurate than binwalk. |
radare2 |
Reverse engineering framework - disassembly, debugging, patching. |
cutter |
GUI for radare2/rizin (needs WSLg under WSL). |
Ghidra |
NSA's reverse engineering suite with decompiler. Needs JDK 17+. |
qemu-user-static |
Run foreign-architecture binaries directly (MIPS/ARM router firmware on x86). |
squashfs-tools |
Mount and extract SquashFS filesystems (common in router firmware). |
cpio / cabextract
|
Extract initramfs and Microsoft cabinet archives. |
| Tool | Purpose |
|---|---|
sigrok-cli |
CLI for logic analyzers - Saleae clones, FX2, DSLogic, etc. |
pulseview |
GUI sigrok front-end with protocol decoders (IยฒC, SPI, UART, 1-Wire, CAN, etc.). |
wireshark / tshark
|
Network packet analysis. Also reads Ubertooth and SDR captures. |
tcpdump |
CLI packet capture. |
| Tool | Purpose |
|---|---|
ubertooth |
Ubertooth One BT classic / BLE sniffing (ubertooth-rx, ubertooth-btle). |
bluez / bluez-tools
|
Linux Bluetooth stack - bluetoothctl, hcitool, gatttool. |
| Tool | Purpose |
|---|---|
rns |
Reticulum Network Stack - rnsd, rnsh, rnstatus, rnodeconf. |
nomadnet |
Reticulum chat / pages / files application. |
lxmf |
Lightweight Extensible Messaging Format library. |
meshtastic |
Meshtastic CLI - flash, configure, message LoRa nodes. |
| Tool | Purpose |
|---|---|
ripgrep (rg) |
Fast recursive grep. |
fd-find (fd) |
Fast user-friendly find replacement. |
fzf |
Fuzzy finder - fuzzy history search, file picker, command palette. |
bat |
cat with syntax highlighting and git integration. Binary is batcat on Ubuntu 22.04 (run bat on 23.10+ or Arch/Manjaro). |
eza |
Modern ls replacement (Ubuntu 23.10+, Arch/Manjaro; requires a PPA on Ubuntu 22.04). |
zoxide |
Smarter cd that learns from your habits. |
direnv |
Per-directory environment variables. |
gh |
GitHub CLI - issues, PRs, repo management. |
pandoc |
Convert between markup formats (Markdown โ DOCX โ PDF โ HTML). |
| Task | Command |
|---|---|
| Shutdown WSL completely |
wsl --shutdown (from PowerShell) |
| List running distros |
wsl -l -v (from PowerShell) |
| Open Windows Explorer at current path | explorer.exe . |
| Open VSCode at current path | code . |
| Copy to Windows clipboard | cat file.txt | clip.exe |
| Paste from Windows clipboard | powershell.exe Get-Clipboard |
| Access Windows files | /mnt/c/Users/<user>/... |
| List USB devices ready to attach |
usbipd list (from PowerShell) |
| Attach USB to WSL |
usbipd attach --wsl --busid X-Y (from PowerShell admin) |
Quick-reference for Linux-based OSINT tooling. For full methodology, workflows, and tool documentation see OSINT/OSINT_GUIDE.md and OSINT/OSINT_CHEATSHEET.md.
OPSEC: Always operate through a VPN or Tor during OSINT work. Use dedicated VMs or burner accounts - never your personal identity.
Start when you have a username, real name, or email address.
| Tool | Command | Purpose |
|---|---|---|
sherlock |
sherlock <username> |
Username search across 400+ social platforms. |
maigret |
maigret <username> |
Advanced username enum with extra data extraction. |
holehe |
holehe <email> |
Checks which services an email is registered on. |
h8mail |
h8mail -t <email> |
Breach hunting - finds passwords linked to email. |
theHarvester |
theHarvester -d <domain> -b google |
Scrapes emails, names, subdomains from search engines. |
Start when you have a domain, IP, or URL.
| Tool | Command | Purpose |
|---|---|---|
amass |
amass enum -d <domain> |
Deep DNS enumeration and subdomain mapping. |
amass |
amass enum -passive -d <domain> |
Passive-only mode (no active probing). |
subfinder |
subfinder -d <domain> |
Fast subdomain discovery from passive sources. |
photon |
python photon.py -u <url> -l 3 |
Crawls for endpoints, keys, emails, JS files. |
whatweb |
whatweb <target> |
Fingerprint web technologies and CMS. |
whois |
whois <domain> |
Registrar, owner, nameserver lookup. |
dig |
dig <domain> ANY |
DNS records - A, MX, NS, TXT, SOA. |
shodan |
shodan host <IP> |
Open ports and running services on a target IP. |
Google Dorking Quick Reference:
site:target.com filetype:pdf
site:target.com inurl:admin
site:target.com intitle:"index of"
"@target.com" site:pastebin.com
site:*.target.com -wwwStart when you have a phone number.
| Tool | Command | Purpose |
|---|---|---|
phoneinfoga |
phoneinfoga scan -n +1XXXXXXXXXX |
Carrier lookup, number validation, OSINT. |
Automate collection and visualize relationships.
| Tool | Command / Usage | Purpose |
|---|---|---|
spiderfoot |
spiderfoot -s <target> |
Runs 100+ automated modules against a single target. |
recon-ng |
recon-ng (interactive) |
Framework with workspace management and module marketplace. |
| Maltego | GUI - drag-and-drop | Visual link analysis and entity relationship mapping. |
Recon-ng Quick Start:
recon-ng
[recon-ng][default] > workspaces create <case_name>
[recon-ng][case_name] > marketplace install all
[recon-ng][case_name] > modules search| Command | Purpose |
|---|---|
exiftool image.jpg |
Extract EXIF metadata (GPS, timestamps, device). |
exiftool -gpslatitude -gpslongitude image.jpg |
Pull GPS coords only. |
metagoofil -d <domain> -t pdf,doc -l 100 -o output |
Harvest metadata from public documents. |
grep -r "regex" ./raw_data/ |
Search collected data for patterns. |
strings file.bin | grep -i "http" |
Pull URLs/strings from binary files. |
pip/pipx installs:
pipx install sherlock-project
pipx install maigret
pipx install h8mail && pipx install holeheGit-based installs:
mkdir -p ~/osint-tools && cd ~/osint-tools
git clone https://github.com/laramies/theHarvester && \
cd theHarvester && pip3 install -r requirements.txt && cd ..
git clone https://github.com/smicallef/spiderfoot && \
cd spiderfoot && pip3 install -r requirements.txt && cd ..
git clone https://github.com/s0md3v/Photon && \
cd Photon && pip3 install -r requirements.txt && cd ..Go-based installs:
go install -v github.com/owasp-amass/amass/v4/...@latest
go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest| Service | URL | Use Case |
|---|---|---|
| Shodan | https://shodan.io | Internet-connected device search |
| Censys | https://censys.com | Internet-wide scanning and certificate data |
| Have I Been Pwned | https://haveibeenpwned.com | Email breach notification |
| Hunter.io | https://hunter.io | Email finder and domain email patterns |
| GreyNoise | https://greynoise.io | Background noise / IP reputation |
| OSINT Framework | https://osintframework.com | Tool directory organized by target type |
| Wayback Machine | https://archive.org | Historical snapshots of web pages |
| Archive.today | https://archive.is | On-demand page archiving |
| IntelX | https://intelx.io | Breach data and dark web search |
| VirusTotal | https://virustotal.com | IOC enrichment - IPs, domains, hashes |
โ
Route all traffic through VPN or Tor before investigating
โ
Use a dedicated OSINT VM (Tsurugi, Buscador, or DIY)
โ
Never use personal accounts - create isolated sock puppet personas
โ
Use burner email (ProtonMail/Tutanota) and virtual phone numbers
โ
Screenshot and archive evidence as you go (archive.is, Wayback)
โ
Log all commands, queries, and sources
โ
Cross-reference findings from at least two independent sources
โ
Respect ToS - unauthorized scraping can have legal consequences
IMPORTANT: These tools are for authorized security testing only. Unauthorized access to networks is illegal. Always:
- Get written permission before testing
- Only test networks you own or have explicit authorization to test
- Follow responsible disclosure practices
- Comply with local laws and regulations
- Use for educational purposes in controlled environments
Legal Use Cases:
- Penetration testing with client authorization
- Security research in isolated lab environments
- Testing your own network security
- Educational purposes with proper supervision
- CTF (Capture The Flag) competitions
- README.md - Documentation section index: all guides and cheat sheets in this directory
- python.md - Python scripting for security: socket programming, Scapy, ctypes/WinAPI automation
- wireshark.md - Wireshark filter reference for the network traffic you'll be capturing on Linux
- ../HardwareHacking/Chapter2.md - Hardware interface fundamentals (UART, SPI, I2C, JTAG) accessed via Linux serial tools
- ../Scripts/pnwc_install_tools.sh - Automated installer for cybersecurity tools on Kali/Debian and Arch/Manjaro
Last Updated: 06-08-2026
๐ Source: Documentation/LinuxCheatSheet.md | โ๏ธ Suggest an edit | โฌ
๏ธ Back to Technical Guides & Cheat Sheets
- ๐บ๏ธ Browse by Topic
- ๐ All Repository Files
- ๐งญ Learning Paths
- ๐ Master Guide
- ๐ค Glossary
- โ๏ธ Legal & Disclaimer
๐ Foundations & Learning
๐ก๏ธ Defense & Investigations
- Incident Response
- Open Source Intelligence (OSINT)
- Reverse Engineering
- Operations Security (OPSEC)
- Compliance
โ๏ธ Platforms & Infrastructure
๐ก Hardware, Wireless & Field Projects
- PNWC Cyberdeck
- Hardware Testing
- Hardware Hacking
- Software-Defined Radio
- Wardriving
- uConsole
- Space Security
๐งฐ Assessment & Field Reference
๐ฆ Downloads & Project Resources
๐๏ธ Additional Topics