Terminal Commands Reference

This document lists all commands available in the interactive 404 terminal and their behavior.

  • help: Show interactive help menu. In CTF mode shows CTF-specific commands. Clickable commands auto-type.

    • Usage: help
  • ls: List available routes (normal mode) or files (CTF mode). Supports -a to show hidden files in CTF mode.

    • Usage: ls, ls -a
  • pwd: Print the current requested path.

    • Usage: pwd
  • whoami: Show basic visitor/session info and browser string.

    • Usage: whoami
  • ip: Fetch and display your public IP and approximate geolocation (uses ipapi.co). Runs asynchronously.

    • Usage: ip
  • date: Show current date/time.

    • Usage: date
  • history: Show recent commands entered in the terminal session.

    • Usage: history
  • joke: Display a random programming joke.

    • Usage: joke
  • quote: Display an inspirational programming quote.

    • Usage: quote
  • fortune: Show a random fortune-cookie style message.

    • Usage: fortune
  • cowsay: Show an ASCII cow with a random message.

    • Usage: cowsay
  • matrix: Animated Matrix-style display played for a few frames (asynchronous).

    • Usage: matrix
  • sudo: Playful permission-denied responses.

    • Usage: sudo
  • ssh: Simulated SSH connection. If called with secret (e.g. ssh secret) it enters CTF mode.

    • Usage: ssh [target]
    • Example: ssh secret → enters CTF mode with prompt ctf@secrets:~$
  • hack: Animated mock “hack” progress sequence (asynchronous), then suggests ssh secret.

    • Usage: hack
  • echo: Repeat the provided message.

    • Usage: echo hello world
  • about: Short about text for Xavier’s portfolio.

    • Usage: about
  • socials: Lists configured social links (from window.SOCIALS). Links open in new tab.

    • Usage: socials
  • banner: Displays an ASCII banner of the site header.

    • Usage: banner
  • cat: Read file contents. In CTF mode supports readme.md, flag.txt and in .hidden/flag.txt shows an encoded flag you can click to copy.

    • Usage: cat <filename>
    • Example (CTF): cat readme.md, cat flag.txt (in .hidden will reveal base64 string)
  • sl: Steam locomotive easter egg (animated train). Typo of ls.

    • Usage: sl
  • man: Show short manual pages for some commands (e.g., man cd, man ls).

    • Usage: man <command>
  • home: Redirect to home route (uses ROUTES.home if available).

    • Usage: home
  • clear: Clear the terminal output.

    • Usage: clear
  • secret: A secret helper command. With no args shows a hint; secret clue or secret help prints SSH hint to use ssh secret.

    • Usage: secret, secret clue

CTF Mode Specific Commands (only available after ssh secret):

  • decode: Decode a base64 string. Clickable decoded output can be copied to clipboard.

    • Usage: decode <base64-string>
    • Example: decode RmxhZ3tXM2xsX0QwbjN9Flag{W3ll_D0n3}
  • hint: Show a CTF hint.

    • Usage: hint
  • submit: Submit the decoded flag. On success it redirects to the configured certificate URL.

    • Usage: submit Flag{W3ll_D0n3}
  • exit: Exit CTF mode and return to normal terminal mode/prompt.

    • Usage: exit

Notes

  • Many commands accept -h or --help to display usage information (e.g., ls -h, cat -h, decode -h, submit -h).
  • When a command runs asynchronously (e.g., ip, matrix, sl, hack) input is blocked until completion.
  • Clickable elements (decoded flags, encoded strings) use the Clipboard API when available with fallbacks.

If you want, I can also:

  • Generate a printable cheatsheet PDF from this markdown.
  • Add this reference into the site navigation or README.md.

Generated from themes/minimal-portfolio/assets/js/console.js.