[
  {
    "name": "alias",
    "description": "Create shortcuts - custom abbreviations for long commands.",
    "examples": [
      {
        "cmd": "alias ll='ls -la'",
        "desc": "Create shortcut"
      },
      {
        "cmd": "alias ..='cd ..'",
        "desc": "Quick navigation"
      },
      {
        "cmd": "alias grep='grep --color=auto'",
        "desc": "Colorize grep"
      },
      {
        "cmd": "alias update='sudo apt update && sudo apt upgrade'",
        "desc": "Combo command"
      }
    ],
    "protip": "Add to ~/.bashrc to make aliases permanent!"
  },
  {
    "name": "awk",
    "description": "Text processing - extracts and manipulates columns of data.",
    "examples": [
      {
        "cmd": "awk '{print $1}' file.txt",
        "desc": "Print first column"
      },
      {
        "cmd": "awk -F: '{print $1}' /etc/passwd",
        "desc": "Extract usernames"
      },
      {
        "cmd": "awk 'NR>1 {sum+=$3} END {print sum}' data.txt",
        "desc": "Sum column 3"
      }
    ],
    "protip": "Use '-F,' for comma-separated files and 'NR>1' to skip the header line!"
  },
  {
    "name": "basename",
    "description": "Strip the path - leaves just the file name, optionally without suffix.",
    "examples": [
      {
        "cmd": "basename /var/log/syslog",
        "desc": "File name only"
      },
      {
        "cmd": "basename photo.jpg .jpg",
        "desc": "Remove the suffix too"
      },
      {
        "cmd": "dirname /var/log/syslog",
        "desc": "Folder part only"
      },
      {
        "cmd": "realpath file.txt",
        "desc": "Full absolute path"
      }
    ],
    "protip": "Great in loops: 'for f in *.png; do echo \"$(basename \"$f\" .png)\"; done'!"
  },
  {
    "name": "cat",
    "description": "Concatenate and display files - shows file contents in terminal.",
    "examples": [
      {
        "cmd": "cat file.txt",
        "desc": "Display file contents"
      },
      {
        "cmd": "cat file1.txt file2.txt > combined.txt",
        "desc": "Merge files"
      },
      {
        "cmd": "cat -n file.txt",
        "desc": "Show with line numbers"
      },
      {
        "cmd": "cat file.txt | grep error",
        "desc": "View and search"
      }
    ],
    "protip": "Use 'cat file1.txt file2.txt > merged.txt' to combine files!"
  },
  {
    "name": "cd",
    "description": "Change directory - move between folders in your terminal.",
    "examples": [
      {
        "cmd": "cd ~/Documents",
        "desc": "Go to Documents folder"
      },
      {
        "cmd": "cd ..",
        "desc": "Go up one level"
      },
      {
        "cmd": "cd -",
        "desc": "Jump back to previous directory"
      },
      {
        "cmd": "cd /var/log",
        "desc": "Go to absolute path"
      },
      {
        "cmd": "cd ../../",
        "desc": "Go up two levels"
      }
    ],
    "protip": "Just 'cd' with no path takes you home. Use 'cd -' to jump back to previous folder!"
  },
  {
    "name": "chgrp",
    "description": "Change group ownership - set which group owns files and folders.",
    "examples": [
      {
        "cmd": "chgrp staff file.txt",
        "desc": "Change group"
      },
      {
        "cmd": "sudo chgrp -R www-data /var/www",
        "desc": "Change recursively"
      },
      {
        "cmd": "ls -l file.txt",
        "desc": "Check the group column"
      }
    ],
    "protip": "Combine with 'chmod g+s dir' so new files inherit the group!"
  },
  {
    "name": "chmod",
    "description": "Change file permissions - controls who can read/write/execute files.",
    "examples": [
      {
        "cmd": "chmod 755 script.sh",
        "desc": "Make executable for all"
      },
      {
        "cmd": "chmod u+x file.sh",
        "desc": "Add execute for owner"
      },
      {
        "cmd": "chmod -R a+rX folder/",
        "desc": "Make folder readable recursively"
      },
      {
        "cmd": "chmod go-w file.txt",
        "desc": "Remove write for group/others"
      }
    ],
    "protip": "755 = rwxr-xr-x. Use 'chmod +x script.sh' for executables!"
  },
  {
    "name": "chown",
    "description": "Change file owner - transfers ownership of files.",
    "examples": [
      {
        "cmd": "sudo chown user:group file.txt",
        "desc": "Change owner and group"
      },
      {
        "cmd": "sudo chown -R www-data:www-data /var/www",
        "desc": "Web server ownership"
      },
      {
        "cmd": "sudo chown user file.txt",
        "desc": "Change only owner"
      }
    ],
    "protip": "Use 'chown -R user:group folder/' to change entire directories!"
  },
  {
    "name": "cp",
    "description": "Copy files and directories - creates duplicates while keeping originals.",
    "examples": [
      {
        "cmd": "cp file.txt backup.txt",
        "desc": "Copy a file"
      },
      {
        "cmd": "cp -r folder/ backup/",
        "desc": "Copy entire folder"
      },
      {
        "cmd": "cp -p file.conf file.bak",
        "desc": "Preserve timestamps/permissions"
      },
      {
        "cmd": "cp *.jpg ~/Pictures/",
        "desc": "Copy all images"
      }
    ],
    "protip": "Use 'cp -u' to only copy newer files - saves time on big backups!"
  },
  {
    "name": "crontab",
    "description": "Schedule recurring jobs - run commands automatically at set times.",
    "examples": [
      {
        "cmd": "crontab -e",
        "desc": "Edit your scheduled jobs"
      },
      {
        "cmd": "crontab -l",
        "desc": "List your jobs"
      },
      {
        "cmd": "0 3 * * * /path/to/backup.sh",
        "desc": "Line: every night at 03:00"
      },
      {
        "cmd": "*/5 * * * * /path/to/cmd",
        "desc": "Line: every 5 minutes"
      }
    ],
    "protip": "Use crontab.guru to double-check your schedule syntax!"
  },
  {
    "name": "curl",
    "description": "Transfer data from servers - download files and test APIs.",
    "examples": [
      {
        "cmd": "curl https://example.com",
        "desc": "Fetch webpage"
      },
      {
        "cmd": "curl -O https://site.com/file.zip",
        "desc": "Download file"
      },
      {
        "cmd": "curl -X POST -d 'data' api.com",
        "desc": "Send POST request"
      },
      {
        "cmd": "curl -I website.com",
        "desc": "Show headers only"
      }
    ],
    "protip": "Use 'curl -I' to show just headers. 'curl -L' follows redirects!"
  },
  {
    "name": "cut",
    "description": "Cut out columns - extract fields or characters from each line.",
    "examples": [
      {
        "cmd": "cut -d, -f1 data.csv",
        "desc": "First column of a CSV"
      },
      {
        "cmd": "cut -d: -f1,7 /etc/passwd",
        "desc": "Users and their shells"
      },
      {
        "cmd": "cut -c1-10 file.txt",
        "desc": "First 10 characters per line"
      },
      {
        "cmd": "cut -f2 data.tsv",
        "desc": "Second tab-separated field"
      }
    ],
    "protip": "Use 'cut -d: -f1 /etc/passwd' to list every user on the system!"
  },
  {
    "name": "date",
    "description": "Show date and time - print or format the current date.",
    "examples": [
      {
        "cmd": "date",
        "desc": "Current date and time"
      },
      {
        "cmd": "date +%F",
        "desc": "Date as YYYY-MM-DD"
      },
      {
        "cmd": "date -d tomorrow",
        "desc": "Tomorrow's date"
      },
      {
        "cmd": "date +%s",
        "desc": "Seconds since 1970 (Unix time)"
      }
    ],
    "protip": "Use 'date +%F' in file names for sortable dates like 2026-10-16!"
  },
  {
    "name": "df",
    "description": "Disk free - shows available disk space.",
    "examples": [
      {
        "cmd": "df -h",
        "desc": "Show space in GB/MB"
      },
      {
        "cmd": "df -h /home",
        "desc": "Check specific mount"
      },
      {
        "cmd": "df -i",
        "desc": "Show inode usage"
      },
      {
        "cmd": "df -h | grep -v tmpfs",
        "desc": "Hide temp filesystems"
      }
    ],
    "protip": "Use 'df -h | grep -v tmpfs' to hide temporary filesystems!"
  },
  {
    "name": "diff",
    "description": "Compare files line by line - shows exactly what changed.",
    "examples": [
      {
        "cmd": "diff old.txt new.txt",
        "desc": "Show differences"
      },
      {
        "cmd": "diff -u old.txt new.txt",
        "desc": "Unified (patch) format"
      },
      {
        "cmd": "diff -r dir1 dir2",
        "desc": "Compare whole folders"
      },
      {
        "cmd": "diff -y a.txt b.txt",
        "desc": "Side by side"
      }
    ],
    "protip": "Use 'diff -u' for the familiar patch format that git uses!"
  },
  {
    "name": "dig",
    "description": "DNS lookup - asks DNS servers about domains and records.",
    "examples": [
      {
        "cmd": "dig example.com",
        "desc": "Full DNS answer"
      },
      {
        "cmd": "dig +short example.com",
        "desc": "Just the IP"
      },
      {
        "cmd": "dig MX example.com",
        "desc": "Mail servers"
      },
      {
        "cmd": "dig @1.1.1.1 example.com",
        "desc": "Ask a specific DNS server"
      }
    ],
    "protip": "Use 'dig +short' for just the answer, perfect in scripts!"
  },
  {
    "name": "dmesg",
    "description": "Show kernel messages - hardware, drivers and boot events.",
    "examples": [
      {
        "cmd": "sudo dmesg",
        "desc": "All kernel messages"
      },
      {
        "cmd": "sudo dmesg -T",
        "desc": "Human-readable timestamps"
      },
      {
        "cmd": "sudo dmesg -w",
        "desc": "Follow new messages"
      },
      {
        "cmd": "sudo dmesg --level=err,warn",
        "desc": "Only problems"
      }
    ],
    "protip": "Plug in a USB device and run 'sudo dmesg -w' to see it appear live!"
  },
  {
    "name": "du",
    "description": "Disk usage - shows how much space files/folders use.",
    "examples": [
      {
        "cmd": "du -sh folder/",
        "desc": "Show folder size"
      },
      {
        "cmd": "du -h --max-depth=1",
        "desc": "Show subfolders only"
      },
      {
        "cmd": "du -sh * | sort -h",
        "desc": "Sort by size"
      },
      {
        "cmd": "du -ha /var/log",
        "desc": "Show all files"
      }
    ],
    "protip": "Use 'du -sh * | sort -h' to show largest folders first!"
  },
  {
    "name": "echo",
    "description": "Display text - prints text to screen or files.",
    "examples": [
      {
        "cmd": "echo 'Hello World'",
        "desc": "Print text"
      },
      {
        "cmd": "echo $PATH",
        "desc": "Show environment variable"
      },
      {
        "cmd": "echo 'text' > file.txt",
        "desc": "Write to file"
      },
      {
        "cmd": "echo 'more' >> file.txt",
        "desc": "Append to file"
      }
    ],
    "protip": "Use 'echo -e' for newlines: 'echo -e \"Line1\\nLine2\"'"
  },
  {
    "name": "env",
    "description": "Environment variables - list them or run a command with changes.",
    "examples": [
      {
        "cmd": "env",
        "desc": "List all environment variables"
      },
      {
        "cmd": "env | grep PATH",
        "desc": "Find a variable"
      },
      {
        "cmd": "env LANG=C sort file.txt",
        "desc": "Run with a changed variable"
      },
      {
        "cmd": "printenv HOME",
        "desc": "Print one variable"
      }
    ],
    "protip": "Use '#!/usr/bin/env python3' in scripts to find the interpreter on any system!"
  },
  {
    "name": "export",
    "description": "Export variables - pass them on to programs you start.",
    "examples": [
      {
        "cmd": "export EDITOR=vim",
        "desc": "Set default editor"
      },
      {
        "cmd": "export PATH=\"$HOME/bin:$PATH\"",
        "desc": "Add a folder to PATH"
      },
      {
        "cmd": "export -p",
        "desc": "List exported variables"
      },
      {
        "cmd": "unset VAR",
        "desc": "Remove a variable"
      }
    ],
    "protip": "Put exports in ~/.bashrc to keep them in every new terminal!"
  },
  {
    "name": "file",
    "description": "Detect file type - looks at the content, not the extension.",
    "examples": [
      {
        "cmd": "file photo.jpg",
        "desc": "Show file type"
      },
      {
        "cmd": "file *",
        "desc": "Types of all files here"
      },
      {
        "cmd": "file -i doc.txt",
        "desc": "Show MIME type"
      }
    ],
    "protip": "Use it on downloads to check that a '.pdf' really is a PDF!"
  },
  {
    "name": "find",
    "description": "Search for files and directories - finds files by name, size, date, etc.",
    "examples": [
      {
        "cmd": "find . -name '*.txt'",
        "desc": "Find all .txt files"
      },
      {
        "cmd": "find /var/log -mtime -7",
        "desc": "Files modified last 7 days"
      },
      {
        "cmd": "find . -type f -size +10M",
        "desc": "Files larger than 10MB"
      },
      {
        "cmd": "find . -name '*.tmp' -delete",
        "desc": "Find and delete"
      }
    ],
    "protip": "Use 'find . -name \"*.tmp\" -delete' to find and delete in one command!"
  },
  {
    "name": "free",
    "description": "Show memory usage - RAM and swap, used and available.",
    "examples": [
      {
        "cmd": "free -h",
        "desc": "Human-readable memory usage"
      },
      {
        "cmd": "free -m",
        "desc": "Values in megabytes"
      },
      {
        "cmd": "free -h -s 2",
        "desc": "Refresh every 2 seconds"
      }
    ],
    "protip": "Look at the 'available' column, not 'free' - Linux uses spare RAM as cache!"
  },
  {
    "name": "git",
    "description": "Version control system - tracks code changes and enables collaboration.",
    "examples": [
      {
        "cmd": "git status",
        "desc": "Check what changed"
      },
      {
        "cmd": "git add .",
        "desc": "Stage all changes"
      },
      {
        "cmd": "git commit -m 'message'",
        "desc": "Save changes"
      },
      {
        "cmd": "git push origin main",
        "desc": "Upload to remote"
      },
      {
        "cmd": "git log --oneline",
        "desc": "View history"
      }
    ],
    "protip": "Use 'git stash' to save work-in-progress without committing!"
  },
  {
    "name": "grep",
    "description": "Search for text patterns - finds content in files super fast.",
    "examples": [
      {
        "cmd": "grep 'error' logfile.txt",
        "desc": "Search for 'error'"
      },
      {
        "cmd": "grep -r 'TODO' .",
        "desc": "Search all files recursively"
      },
      {
        "cmd": "grep -i 'warning' *.log",
        "desc": "Case-insensitive search"
      },
      {
        "cmd": "ps aux | grep nginx",
        "desc": "Search process list"
      },
      {
        "cmd": "grep -n 'function' script.js",
        "desc": "Show line numbers"
      }
    ],
    "protip": "Use 'grep -r' to search entire folders, 'grep -v' to show non-matching lines!"
  },
  {
    "name": "gzip",
    "description": "Compress files - small, fast and available everywhere.",
    "examples": [
      {
        "cmd": "gzip file.txt",
        "desc": "Compress (replaces file)"
      },
      {
        "cmd": "gzip -k file.txt",
        "desc": "Keep the original"
      },
      {
        "cmd": "gunzip file.txt.gz",
        "desc": "Decompress"
      },
      {
        "cmd": "zcat file.gz",
        "desc": "Print contents of a .gz file"
      }
    ],
    "protip": "Use 'gzip -k' to keep the original file!"
  },
  {
    "name": "head",
    "description": "Output first lines - shows beginning of files.",
    "examples": [
      {
        "cmd": "head file.txt",
        "desc": "Show first 10 lines"
      },
      {
        "cmd": "head -n 20 file.txt",
        "desc": "Show first 20 lines"
      },
      {
        "cmd": "head -c 100 file.txt",
        "desc": "Show first 100 bytes"
      }
    ],
    "protip": "Pipe with commands: 'ls -l | head' shows first few items!"
  },
  {
    "name": "history",
    "description": "Command history - shows previously executed commands.",
    "examples": [
      {
        "cmd": "history",
        "desc": "Show recent commands"
      },
      {
        "cmd": "history | grep git",
        "desc": "Search history"
      },
      {
        "cmd": "history -c",
        "desc": "Clear session history"
      },
      {
        "cmd": "!42",
        "desc": "Re-run command #42"
      },
      {
        "cmd": "!!",
        "desc": "Re-run last command"
      }
    ],
    "protip": "Press Ctrl+R for interactive search! '!!' reruns last command!"
  },
  {
    "name": "hostname",
    "description": "Show host name - the name of your machine on the network.",
    "examples": [
      {
        "cmd": "hostname",
        "desc": "Show host name"
      },
      {
        "cmd": "hostname -I",
        "desc": "Show all IP addresses"
      },
      {
        "cmd": "hostnamectl",
        "desc": "Detailed host info (systemd)"
      },
      {
        "cmd": "sudo hostnamectl set-hostname web01",
        "desc": "Change host name"
      }
    ],
    "protip": "Use 'hostname -I' to quickly see your machine's IP addresses!"
  },
  {
    "name": "htop",
    "description": "Interactive process viewer - prettier version of 'top' with colors.",
    "examples": [
      {
        "cmd": "htop",
        "desc": "Launch colorful monitor"
      },
      {
        "cmd": "htop -u username",
        "desc": "Show user's processes"
      },
      {
        "cmd": "htop -p PID1,PID2",
        "desc": "Monitor specific processes"
      }
    ],
    "protip": "Press F6 to sort, F9 to kill, F5 for tree view!"
  },
  {
    "name": "id",
    "description": "User and group IDs - shows who you are and which groups you belong to.",
    "examples": [
      {
        "cmd": "id",
        "desc": "Your UID, GID and groups"
      },
      {
        "cmd": "id alice",
        "desc": "Another user's IDs"
      },
      {
        "cmd": "id -u",
        "desc": "Only your numeric user ID"
      },
      {
        "cmd": "id -Gn",
        "desc": "All your group names"
      }
    ],
    "protip": "Log out and in again after being added to a group, then check with 'id'!"
  },
  {
    "name": "ip",
    "description": "Network configuration - shows interfaces, addresses and routes.",
    "examples": [
      {
        "cmd": "ip a",
        "desc": "Show all IP addresses"
      },
      {
        "cmd": "ip -br a",
        "desc": "Brief address overview"
      },
      {
        "cmd": "ip r",
        "desc": "Show routing table"
      },
      {
        "cmd": "sudo ip link set eth0 up",
        "desc": "Bring an interface up"
      }
    ],
    "protip": "'ip -br a' gives a clean one-line-per-interface overview!"
  },
  {
    "name": "journalctl",
    "description": "System logs - read everything collected by systemd.",
    "examples": [
      {
        "cmd": "journalctl -u nginx",
        "desc": "Logs for one service"
      },
      {
        "cmd": "journalctl -f",
        "desc": "Follow new log lines"
      },
      {
        "cmd": "journalctl --since '1 hour ago'",
        "desc": "Time filter"
      },
      {
        "cmd": "journalctl -b -p err",
        "desc": "Errors from this boot"
      }
    ],
    "protip": "Use 'journalctl -u name -f' to follow one service's log live!"
  },
  {
    "name": "kill",
    "description": "Terminate processes - stops running programs.",
    "examples": [
      {
        "cmd": "kill PID",
        "desc": "Ask process to stop (polite)"
      },
      {
        "cmd": "kill -9 PID",
        "desc": "Force kill (last resort)"
      },
      {
        "cmd": "killall firefox",
        "desc": "Kill by program name"
      },
      {
        "cmd": "kill -SIGTERM PID",
        "desc": "Same as regular kill"
      }
    ],
    "protip": "Try normal kill first, use -9 only as last resort!"
  },
  {
    "name": "less",
    "description": "View files - displays text one page at a time.",
    "examples": [
      {
        "cmd": "less file.txt",
        "desc": "View file (space to scroll)"
      },
      {
        "cmd": "less +F /var/log/syslog",
        "desc": "Follow in real-time"
      },
      {
        "cmd": "ps aux | less",
        "desc": "Paginate output"
      },
      {
        "cmd": "less -N file.txt",
        "desc": "Show line numbers"
      }
    ],
    "protip": "Press '/' to search, 'n' for next match, 'G' for end, 'g' for start!"
  },
  {
    "name": "ln",
    "description": "Create links - makes shortcuts to files or directories.",
    "examples": [
      {
        "cmd": "ln -s /path/to/file shortcut",
        "desc": "Create link"
      },
      {
        "cmd": "ln -s /opt/app/config ~/.config/app",
        "desc": "Link config"
      },
      {
        "cmd": "ln file hardlink",
        "desc": "Create hard link"
      }
    ],
    "protip": "Always use 'ln -s' for symbolic links - they're more flexible!"
  },
  {
    "name": "ls",
    "description": "List directory contents - shows all files and folders in your current location.",
    "examples": [
      {
        "cmd": "ls -la",
        "desc": "Show ALL files including hidden ones (start with .)"
      },
      {
        "cmd": "ls -lh",
        "desc": "Human-readable sizes (1.5M instead of 1536000)"
      },
      {
        "cmd": "ls -lt",
        "desc": "Sort by time, newest first"
      },
      {
        "cmd": "ls *.txt",
        "desc": "Show only .txt files"
      },
      {
        "cmd": "ls -R",
        "desc": "Show subdirectories too"
      }
    ],
    "protip": "Use 'ls -ltr' to see newest files at bottom - perfect for long directories!"
  },
  {
    "name": "lsblk",
    "description": "List block devices - disks, partitions and where they are mounted.",
    "examples": [
      {
        "cmd": "lsblk",
        "desc": "Disks and partitions"
      },
      {
        "cmd": "lsblk -f",
        "desc": "Show filesystems and UUIDs"
      },
      {
        "cmd": "lsblk -o NAME,SIZE,MOUNTPOINT",
        "desc": "Choose columns"
      }
    ],
    "protip": "Run 'lsblk -f' before formatting to be sure you pick the right disk!"
  },
  {
    "name": "lsof",
    "description": "List open files - see which process uses a file, folder or port.",
    "examples": [
      {
        "cmd": "sudo lsof -i :80",
        "desc": "What uses port 80"
      },
      {
        "cmd": "sudo lsof -u alice",
        "desc": "Files opened by a user"
      },
      {
        "cmd": "lsof +D /var/log",
        "desc": "Who uses files in a folder"
      },
      {
        "cmd": "lsof -p 1234",
        "desc": "Files opened by a process"
      }
    ],
    "protip": "'sudo lsof -i :8080' finds what is blocking your port!"
  },
  {
    "name": "man",
    "description": "Manual pages - built-in documentation for every command.",
    "examples": [
      {
        "cmd": "man ls",
        "desc": "Read ls documentation"
      },
      {
        "cmd": "man -k search",
        "desc": "Search all manuals"
      },
      {
        "cmd": "man 5 passwd",
        "desc": "Read file format docs"
      },
      {
        "cmd": "man -f command",
        "desc": "Short description"
      }
    ],
    "protip": "Press '/' to search within a man page, 'q' to quit!"
  },
  {
    "name": "mkdir",
    "description": "Make directory - creates new folders to organize your files.",
    "examples": [
      {
        "cmd": "mkdir myFolder",
        "desc": "Create single folder"
      },
      {
        "cmd": "mkdir -p project/src/components",
        "desc": "Create nested folders"
      },
      {
        "cmd": "mkdir {docs,src,tests}",
        "desc": "Create multiple folders at once"
      },
      {
        "cmd": "mkdir -m 755 public",
        "desc": "Create with specific permissions"
      }
    ],
    "protip": "Use 'mkdir -p path/to/folder' to create all parent directories at once!"
  },
  {
    "name": "mount",
    "description": "Attach filesystems - make a disk or image available in a folder.",
    "examples": [
      {
        "cmd": "mount",
        "desc": "List mounted filesystems"
      },
      {
        "cmd": "sudo mount /dev/sdb1 /mnt",
        "desc": "Mount a partition"
      },
      {
        "cmd": "sudo umount /mnt",
        "desc": "Unmount"
      },
      {
        "cmd": "sudo mount -o loop disk.iso /mnt",
        "desc": "Mount an ISO image"
      }
    ],
    "protip": "Use 'findmnt' for a readable tree of everything that is mounted!"
  },
  {
    "name": "mv",
    "description": "Move or rename files - relocates files or changes their names.",
    "examples": [
      {
        "cmd": "mv old.txt new.txt",
        "desc": "Rename a file"
      },
      {
        "cmd": "mv file.txt ~/Documents/",
        "desc": "Move to another folder"
      },
      {
        "cmd": "mv *.pdf archive/",
        "desc": "Move all PDFs"
      },
      {
        "cmd": "mv -i file.txt ~/",
        "desc": "Ask before overwriting"
      }
    ],
    "protip": "Moving is instant on same disk - just updates directory entry!"
  },
  {
    "name": "nano",
    "description": "Simple text editor - beginner-friendly with shortcuts shown at bottom.",
    "examples": [
      {
        "cmd": "nano file.txt",
        "desc": "Edit file"
      },
      {
        "cmd": "nano +10 file.txt",
        "desc": "Jump to line 10"
      },
      {
        "cmd": "nano -w file.txt",
        "desc": "Disable line wrap"
      }
    ],
    "protip": "Ctrl+O saves, Ctrl+X exits, Ctrl+W searches!"
  },
  {
    "name": "nice",
    "description": "CPU priority - run commands with lower (or higher) priority.",
    "examples": [
      {
        "cmd": "nice -n 19 tar czf backup.tgz /home",
        "desc": "Lowest priority"
      },
      {
        "cmd": "sudo nice -n -5 cmd",
        "desc": "Higher priority (needs root)"
      },
      {
        "cmd": "renice 10 -p 1234",
        "desc": "Change a running process"
      }
    ],
    "protip": "Prefix heavy jobs with 'nice -n 19' so your desktop stays responsive!"
  },
  {
    "name": "nohup",
    "description": "Ignore hangups - keep a command running after you log out.",
    "examples": [
      {
        "cmd": "nohup ./script.sh &",
        "desc": "Run in background, immune to logout"
      },
      {
        "cmd": "nohup cmd > out.log 2>&1 &",
        "desc": "Choose the log file"
      },
      {
        "cmd": "tail -f nohup.out",
        "desc": "Watch default output"
      }
    ],
    "protip": "For anything long-running, tmux or screen is usually nicer!"
  },
  {
    "name": "ping",
    "description": "Test network reachability - sends packets and measures the round-trip time.",
    "examples": [
      {
        "cmd": "ping google.com",
        "desc": "Ping until Ctrl+C"
      },
      {
        "cmd": "ping -c 4 1.1.1.1",
        "desc": "Send exactly 4 packets"
      },
      {
        "cmd": "ping -i 0.5 example.com",
        "desc": "Ping every half second"
      },
      {
        "cmd": "ping -W 2 example.com",
        "desc": "Wait max 2 seconds for reply"
      }
    ],
    "protip": "Use 'ping -c 4' so it stops by itself instead of running forever!"
  },
  {
    "name": "pkill",
    "description": "Kill by name - stop processes without looking up the PID.",
    "examples": [
      {
        "cmd": "pkill firefox",
        "desc": "Stop processes by name"
      },
      {
        "cmd": "pgrep -a node",
        "desc": "Find matching processes first"
      },
      {
        "cmd": "pkill -f 'python app.py'",
        "desc": "Match the full command line"
      },
      {
        "cmd": "pkill -9 hung-app",
        "desc": "Force kill (last resort)"
      }
    ],
    "protip": "Run 'pgrep -a name' first to see what would be killed!"
  },
  {
    "name": "ps",
    "description": "Process status - snapshot of running processes.",
    "examples": [
      {
        "cmd": "ps aux",
        "desc": "Show all processes"
      },
      {
        "cmd": "ps aux | grep nginx",
        "desc": "Find specific process"
      },
      {
        "cmd": "ps -ef",
        "desc": "Alternative format"
      },
      {
        "cmd": "ps -u username",
        "desc": "User's processes"
      },
      {
        "cmd": "ps -p PID",
        "desc": "Specific process info"
      }
    ],
    "protip": "Use 'ps aux --sort=-%mem' to find memory hogs!"
  },
  {
    "name": "pwd",
    "description": "Print working directory - shows where you are in the file system.",
    "examples": [
      {
        "cmd": "pwd",
        "desc": "Show current directory path"
      },
      {
        "cmd": "pwd -P",
        "desc": "Show physical path (resolves links)"
      }
    ],
    "protip": "Run 'pwd' before dangerous commands to verify you're in the right place!"
  },
  {
    "name": "rm",
    "description": "Remove files or directories - permanently deletes files. No undo!",
    "examples": [
      {
        "cmd": "rm file.txt",
        "desc": "Delete a file"
      },
      {
        "cmd": "rm -r folder/",
        "desc": "Delete folder and contents"
      },
      {
        "cmd": "rm -i important.txt",
        "desc": "Ask before deleting"
      },
      {
        "cmd": "rm *.log",
        "desc": "Delete all .log files"
      },
      {
        "cmd": "rm -rf build/",
        "desc": "Force delete (careful!)"
      }
    ],
    "protip": "Use 'rm -i' for confirmation prompts. Many pros alias rm to 'rm -i' by default!"
  },
  {
    "name": "rsync",
    "description": "Remote sync - efficiently sync files by copying only differences.",
    "examples": [
      {
        "cmd": "rsync -avz source/ dest/",
        "desc": "Sync folders"
      },
      {
        "cmd": "rsync -avz --delete src/ backup/",
        "desc": "Perfect mirror"
      },
      {
        "cmd": "rsync -avz -e ssh folder/ user@server:~/",
        "desc": "Sync via SSH"
      }
    ],
    "protip": "Add '--dry-run' to preview changes before committing!"
  },
  {
    "name": "scp",
    "description": "Secure copy - transfer files between computers over SSH.",
    "examples": [
      {
        "cmd": "scp file.txt user@server:/path/",
        "desc": "Upload file"
      },
      {
        "cmd": "scp -r folder/ user@server:~/",
        "desc": "Upload folder"
      },
      {
        "cmd": "scp user@server:/file.txt .",
        "desc": "Download file"
      },
      {
        "cmd": "scp -P 2222 file.txt user@server:~/",
        "desc": "Custom port"
      }
    ],
    "protip": "Use capital -P for port: 'scp -P 2222' (different from ssh -p)!"
  },
  {
    "name": "sed",
    "description": "Stream editor - edits text without opening files.",
    "examples": [
      {
        "cmd": "sed 's/old/new/g' file.txt",
        "desc": "Replace all occurrences"
      },
      {
        "cmd": "sed -i 's/foo/bar/g' *.txt",
        "desc": "Replace in-place"
      },
      {
        "cmd": "sed -n '10,20p' file.txt",
        "desc": "Print lines 10-20"
      },
      {
        "cmd": "sed '/pattern/d' file.txt",
        "desc": "Delete matching lines"
      }
    ],
    "protip": "Test without '-i' first to see changes before saving!"
  },
  {
    "name": "sha256sum",
    "description": "Checksums - compute or verify SHA-256 hashes to check file integrity.",
    "examples": [
      {
        "cmd": "sha256sum file.iso",
        "desc": "Show checksum"
      },
      {
        "cmd": "sha256sum -c SHA256SUMS",
        "desc": "Verify against a list"
      },
      {
        "cmd": "sha256sum *.tar.gz > sums.txt",
        "desc": "Save checksums"
      },
      {
        "cmd": "echo -n text | sha256sum",
        "desc": "Hash a string"
      }
    ],
    "protip": "Always verify downloaded ISOs with 'sha256sum -c' before installing!"
  },
  {
    "name": "sleep",
    "description": "Pause for a given time - useful in scripts and loops.",
    "examples": [
      {
        "cmd": "sleep 5",
        "desc": "Wait 5 seconds"
      },
      {
        "cmd": "sleep 2m",
        "desc": "Wait 2 minutes"
      },
      {
        "cmd": "sleep 0.5",
        "desc": "Wait half a second"
      },
      {
        "cmd": "while true; do date; sleep 1; done",
        "desc": "Simple clock loop"
      }
    ],
    "protip": "Combine with '&&' to run something later: 'sleep 600 && notify-send done'!"
  },
  {
    "name": "sort",
    "description": "Sort lines of text - alphabetically, numerically or by column.",
    "examples": [
      {
        "cmd": "sort names.txt",
        "desc": "Sort alphabetically"
      },
      {
        "cmd": "sort -r names.txt",
        "desc": "Reverse order"
      },
      {
        "cmd": "sort -n numbers.txt",
        "desc": "Sort numerically"
      },
      {
        "cmd": "sort -u list.txt",
        "desc": "Sort and remove duplicates"
      }
    ],
    "protip": "Combine 'sort | uniq -c | sort -rn' to rank the most common lines!"
  },
  {
    "name": "ss",
    "description": "Socket statistics - shows open ports and connections (modern netstat).",
    "examples": [
      {
        "cmd": "sudo ss -tulpn",
        "desc": "Listening TCP/UDP ports with programs"
      },
      {
        "cmd": "ss -t",
        "desc": "Active TCP connections"
      },
      {
        "cmd": "ss -s",
        "desc": "Summary statistics"
      },
      {
        "cmd": "ss -lt 'sport = :22'",
        "desc": "Who listens on port 22"
      }
    ],
    "protip": "'sudo ss -tulpn' shows which program listens on which port!"
  },
  {
    "name": "ssh",
    "description": "Secure shell - connect to remote computers securely.",
    "examples": [
      {
        "cmd": "ssh user@server.com",
        "desc": "Connect to server"
      },
      {
        "cmd": "ssh -p 2222 user@server.com",
        "desc": "Use custom port"
      },
      {
        "cmd": "ssh -i ~/.ssh/key.pem user@server.com",
        "desc": "Use specific key"
      },
      {
        "cmd": "ssh user@server 'ls -la'",
        "desc": "Run single command"
      }
    ],
    "protip": "Set up SSH keys (ssh-keygen) to login without passwords!"
  },
  {
    "name": "stat",
    "description": "Show detailed file info - size, permissions, owner and timestamps.",
    "examples": [
      {
        "cmd": "stat file.txt",
        "desc": "All file details"
      },
      {
        "cmd": "stat -c %s file.txt",
        "desc": "Size in bytes"
      },
      {
        "cmd": "stat -c %a file.txt",
        "desc": "Numeric permissions"
      },
      {
        "cmd": "stat -c %y file.txt",
        "desc": "Last modification time"
      }
    ],
    "protip": "'stat -c %a file' prints permissions as a number like 644!"
  },
  {
    "name": "sudo",
    "description": "Execute as superuser - run commands with admin privileges.",
    "examples": [
      {
        "cmd": "sudo apt update",
        "desc": "Run package manager as admin"
      },
      {
        "cmd": "sudo systemctl restart nginx",
        "desc": "Restart service"
      },
      {
        "cmd": "sudo -i",
        "desc": "Start root shell"
      },
      {
        "cmd": "sudo -u postgres psql",
        "desc": "Run as different user"
      }
    ],
    "protip": "Use 'sudo -i' for root shell. 'sudo !!' reruns last command as root!"
  },
  {
    "name": "systemctl",
    "description": "Control systemd services - start, stop, enable and inspect them.",
    "examples": [
      {
        "cmd": "systemctl status nginx",
        "desc": "Service status"
      },
      {
        "cmd": "sudo systemctl restart nginx",
        "desc": "Restart a service"
      },
      {
        "cmd": "sudo systemctl enable --now nginx",
        "desc": "Start now and on boot"
      },
      {
        "cmd": "systemctl list-units --type=service",
        "desc": "List services"
      }
    ],
    "protip": "'systemctl --failed' instantly shows which services are broken!"
  },
  {
    "name": "tail",
    "description": "Output last lines - shows end of files.",
    "examples": [
      {
        "cmd": "tail file.txt",
        "desc": "Show last 10 lines"
      },
      {
        "cmd": "tail -n 50 file.txt",
        "desc": "Show last 50 lines"
      },
      {
        "cmd": "tail -f /var/log/syslog",
        "desc": "Follow file live"
      },
      {
        "cmd": "tail -f error.log | grep ERROR",
        "desc": "Watch for errors"
      }
    ],
    "protip": "Use 'tail -f error.log | grep ERROR' to watch for errors in real-time!"
  },
  {
    "name": "tar",
    "description": "Archive and compress files - bundles files into single archive.",
    "examples": [
      {
        "cmd": "tar -czvf archive.tar.gz folder/",
        "desc": "Create archive"
      },
      {
        "cmd": "tar -xzvf archive.tar.gz",
        "desc": "Extract archive"
      },
      {
        "cmd": "tar -tzf archive.tar.gz",
        "desc": "List contents"
      },
      {
        "cmd": "tar -xzvf file.tar.gz -C /dest",
        "desc": "Extract to folder"
      }
    ],
    "protip": "Use 'tar -tzf archive.tar.gz' to peek inside without extracting!"
  },
  {
    "name": "tee",
    "description": "Split output - shows output on screen and saves it to a file at the same time.",
    "examples": [
      {
        "cmd": "ls | tee files.txt",
        "desc": "Show and save output"
      },
      {
        "cmd": "make 2>&1 | tee build.log",
        "desc": "Log a build while watching it"
      },
      {
        "cmd": "echo hi | tee -a log.txt",
        "desc": "Append instead of overwrite"
      },
      {
        "cmd": "echo 'x' | sudo tee /etc/myapp.conf",
        "desc": "Write a root-owned file"
      }
    ],
    "protip": "Use 'echo line | sudo tee -a /etc/file' to append to root-owned files!"
  },
  {
    "name": "tmux",
    "description": "Terminal multiplexer - multiple windows and sessions that survive disconnects.",
    "examples": [
      {
        "cmd": "tmux new -s work",
        "desc": "Named session"
      },
      {
        "cmd": "tmux ls",
        "desc": "List sessions"
      },
      {
        "cmd": "tmux attach -t work",
        "desc": "Re-attach to a session"
      },
      {
        "cmd": "Ctrl+b d",
        "desc": "Detach (keeps running)"
      }
    ],
    "protip": "Start every SSH session with 'tmux new -A -s main' - never lose work again!"
  },
  {
    "name": "top",
    "description": "Table of processes - real-time system monitor.",
    "examples": [
      {
        "cmd": "top",
        "desc": "Launch process monitor"
      },
      {
        "cmd": "top -u username",
        "desc": "Show user's processes only"
      },
      {
        "cmd": "top -p PID",
        "desc": "Monitor specific process"
      }
    ],
    "protip": "Press 'P' for CPU sort, 'M' for memory, 'k' to kill, 'q' to quit!"
  },
  {
    "name": "touch",
    "description": "Create empty files or update timestamps - quick way to make new files.",
    "examples": [
      {
        "cmd": "touch newfile.txt",
        "desc": "Create empty file"
      },
      {
        "cmd": "touch script.sh && chmod +x script.sh",
        "desc": "Create and make executable"
      }
    ],
    "protip": "Use 'touch file{1..10}.txt' to create 10 files instantly!"
  },
  {
    "name": "tr",
    "description": "Translate characters - replace, squeeze or delete characters in a stream.",
    "examples": [
      {
        "cmd": "echo hello | tr a-z A-Z",
        "desc": "Convert to uppercase"
      },
      {
        "cmd": "tr '[:upper:]' '[:lower:]' < in.txt",
        "desc": "Convert to lowercase"
      },
      {
        "cmd": "tr -s ' ' < file.txt",
        "desc": "Squeeze repeated spaces"
      },
      {
        "cmd": "echo 'a,b,c' | tr , ' '",
        "desc": "Commas to spaces"
      }
    ],
    "protip": "Squeeze repeated spaces with tr -s before splitting columns with cut!"
  },
  {
    "name": "tree",
    "description": "Show directories as a tree - see the structure of folders at a glance.",
    "examples": [
      {
        "cmd": "tree",
        "desc": "Show current folder as a tree"
      },
      {
        "cmd": "tree -L 2",
        "desc": "Limit depth to 2 levels"
      },
      {
        "cmd": "tree -I 'node_modules|.git'",
        "desc": "Ignore matching folders"
      }
    ],
    "protip": "Use 'tree -L 2 -I node_modules' to keep big projects readable!"
  },
  {
    "name": "uname",
    "description": "Print system information - kernel name, version and architecture.",
    "examples": [
      {
        "cmd": "uname -a",
        "desc": "All system info"
      },
      {
        "cmd": "uname -r",
        "desc": "Kernel release"
      },
      {
        "cmd": "uname -m",
        "desc": "Machine architecture (x86_64, aarch64)"
      }
    ],
    "protip": "'uname -r' tells you the kernel version when searching for drivers!"
  },
  {
    "name": "uniq",
    "description": "Filter repeated lines - removes or counts adjacent duplicates.",
    "examples": [
      {
        "cmd": "sort list.txt | uniq",
        "desc": "Remove duplicate lines"
      },
      {
        "cmd": "sort list.txt | uniq -c",
        "desc": "Count occurrences"
      },
      {
        "cmd": "sort list.txt | uniq -d",
        "desc": "Show only duplicates"
      },
      {
        "cmd": "sort list.txt | uniq -u",
        "desc": "Lines that appear once"
      }
    ],
    "protip": "uniq only sees neighbours - always 'sort' first!"
  },
  {
    "name": "unzip",
    "description": "Extract zip archives - opens .zip files.",
    "examples": [
      {
        "cmd": "unzip archive.zip",
        "desc": "Extract to current folder"
      },
      {
        "cmd": "unzip -l archive.zip",
        "desc": "List contents (preview)"
      },
      {
        "cmd": "unzip archive.zip -d /dest",
        "desc": "Extract to folder"
      },
      {
        "cmd": "unzip '*.zip'",
        "desc": "Extract all zip files"
      }
    ],
    "protip": "Use 'unzip -l' to show contents without extracting!"
  },
  {
    "name": "uptime",
    "description": "System uptime - how long it has been running and the load average.",
    "examples": [
      {
        "cmd": "uptime",
        "desc": "Uptime, users and load"
      },
      {
        "cmd": "uptime -p",
        "desc": "Pretty format (up 3 days)"
      },
      {
        "cmd": "uptime -s",
        "desc": "Time the system booted"
      }
    ],
    "protip": "Load average above your CPU count ('nproc') means processes are waiting!"
  },
  {
    "name": "vim",
    "description": "Vi improved editor - powerful but steep learning curve.",
    "examples": [
      {
        "cmd": "vim file.txt",
        "desc": "Edit in vim"
      },
      {
        "cmd": "vim +10 file.txt",
        "desc": "Jump to line 10"
      },
      {
        "cmd": "vim -d file1.txt file2.txt",
        "desc": "Compare files"
      }
    ],
    "protip": "Press 'i' to insert, ESC to exit mode, ':wq' to save and quit!"
  },
  {
    "name": "watch",
    "description": "Repeat a command - reruns it and shows the output full-screen.",
    "examples": [
      {
        "cmd": "watch df -h",
        "desc": "Refresh disk usage every 2s"
      },
      {
        "cmd": "watch -n 1 free -h",
        "desc": "Refresh every second"
      },
      {
        "cmd": "watch -d ls -l",
        "desc": "Highlight changes"
      }
    ],
    "protip": "Add '-d' to highlight what changed between updates!"
  },
  {
    "name": "wc",
    "description": "Word count - counts lines, words and bytes in files or input.",
    "examples": [
      {
        "cmd": "wc file.txt",
        "desc": "Lines, words and bytes"
      },
      {
        "cmd": "wc -l file.txt",
        "desc": "Count lines only"
      },
      {
        "cmd": "wc -w essay.txt",
        "desc": "Count words only"
      }
    ],
    "protip": "Pipe anything into 'wc -l' to count results, e.g. 'ls | wc -l'!"
  },
  {
    "name": "wget",
    "description": "Download files from web - can resume interrupted downloads.",
    "examples": [
      {
        "cmd": "wget https://example.com/file.zip",
        "desc": "Download file"
      },
      {
        "cmd": "wget -r https://website.com",
        "desc": "Download entire site"
      },
      {
        "cmd": "wget -c https://example.com/large-file.iso",
        "desc": "Resume interrupted download"
      },
      {
        "cmd": "wget -b https://example.com/hugefile.zip",
        "desc": "Download in background"
      }
    ],
    "protip": "Use 'wget -c' to continue partial downloads even after connection drops!"
  },
  {
    "name": "which",
    "description": "Locate a command - shows full path of executables.",
    "examples": [
      {
        "cmd": "which python",
        "desc": "Find which Python runs"
      },
      {
        "cmd": "which -a python",
        "desc": "Show all Python installations"
      },
      {
        "cmd": "which gcc",
        "desc": "Find compiler location"
      }
    ],
    "protip": "Use 'which -a python' to show ALL installed versions!"
  },
  {
    "name": "whoami",
    "description": "Current user - prints the user name you are running as.",
    "examples": [
      {
        "cmd": "whoami",
        "desc": "Show your user name"
      },
      {
        "cmd": "sudo whoami",
        "desc": "Shows root"
      },
      {
        "cmd": "who",
        "desc": "Everyone logged in"
      }
    ],
    "protip": "Handy in scripts to refuse running as root by mistake!"
  },
  {
    "name": "xargs",
    "description": "Build commands from input - turns lines of input into arguments.",
    "examples": [
      {
        "cmd": "find . -name '*.log' -print0 | xargs -0 rm",
        "desc": "Delete found files"
      },
      {
        "cmd": "find . -name '*.txt' -print0 | xargs -0 wc -l",
        "desc": "Count lines in found files"
      },
      {
        "cmd": "cat urls.txt | xargs -n1 curl -O",
        "desc": "Download each URL"
      },
      {
        "cmd": "echo a b c | xargs -n1",
        "desc": "One argument per line"
      }
    ],
    "protip": "Use 'find ... -print0 | xargs -0' so filenames with spaces work!"
  },
  {
    "name": "zip",
    "description": "Create zip archives - works on all operating systems.",
    "examples": [
      {
        "cmd": "zip archive.zip file1.txt file2.txt",
        "desc": "Create zip"
      },
      {
        "cmd": "zip -r folder.zip folder/",
        "desc": "Zip entire folder"
      },
      {
        "cmd": "zip -e secure.zip file.txt",
        "desc": "Password-protect (weak)"
      },
      {
        "cmd": "zip -9 compressed.zip file.txt",
        "desc": "Maximum compression"
      }
    ],
    "protip": "Use 'zip -e' to create password-protected archives!"
  }
]