← Back to home

Terminal Hacker Prank: 20 Mac & Linux Commands That Look Like Hacking

Green text, a black window, and output scrolling faster than anyone can read. On a Mac or a Linux PC you can set that up in under a minute with commands that are already installed, and none of them change anything on the machine. On Windows? Use the CMD hacker prank instead.

Last reviewed on November 11, 2026. The macOS commands and all three scripts were tested on macOS 27 in zsh and bash. The Linux column uses the standard Ubuntu and Debian tools, with an install command wherever one isn't there by default.

The 30-second version

macOS

  1. Press Cmd + Space, type Terminal, and press Enter.
  2. Choose Shell → New Window → Homebrew. You now have bright green text on black.
  3. Rename the window: printf '\033]0;SYSTEM BREACH IN PROGRESS\007'
  4. Start the scroll: /usr/bin/log stream. It's the Mac's live system log, and it pours out hundreds of lines a second.
  5. Press Ctrl + Cmd + F for fullscreen. Press Ctrl + C when the joke is over.

Linux

  1. Press Ctrl + Alt + T to open a terminal (Ubuntu, Mint, Pop!_OS, and most other desktops).
  2. Turn the text green: printf '\033[32m'
  3. Start the scroll: journalctl -f, or sudo dmesg -w for kernel messages.
  4. Press F11 for fullscreen.

Everything on this page is harmless. The commands only read and print information about your own machine, or change cosmetic settings that reset when you close the window. Still, the golden rule applies: never paste commands you don't understand into a terminal, and never run a script someone sends you without reading it first. That goes double for anything that starts with sudo or curl … | sh.

20 harmless Terminal commands that look like hacking

Most of them are on both systems. Where macOS and Linux differ, both versions are given. Click any command to copy it. Commands that never finish on their own stop with Ctrl + C.

What it looks likemacOSLinuxWhat it actually does
Intercepting the system's live traffic /usr/bin/log stream journalctl -f Streams your own system log as it's written. The fastest, densest scroll on a Mac. The full path matters in zsh, which has its own unrelated log command.
Monitoring every running process top top A live, refreshing list of processes and CPU use. Press q to quit.
Same, in color htop htop The colorful version of top, with CPU bars. Needs installing: brew install htop or sudo apt install htop.
Dumping raw memory hexdump -C /dev/urandom hexdump -C /dev/urandom Prints an endless wall of random bytes in hex. Pure noise from the random number generator. Add | grep "ca fe" to slow it down to "matches".
Mapping the entire file system ls -lR /usr ls -lR /usr Lists every file under /usr with permissions and sizes. The equivalent of dir /s on Windows.
Hunting for system files find /usr -type f find /usr -type f Prints the path of every file under /usr. Sticking to /usr avoids macOS privacy pop-ups and Linux "permission denied" noise.
Holding a link to a remote server ping 8.8.8.8 ping 8.8.8.8 Pings Google's public DNS server once a second, forever. Unlike Windows, no -t is needed.
Tracing the route into the target traceroute 8.8.8.8 tracepath 8.8.8.8 Shows each network hop between you and the destination, one line at a time. traceroute also works on Linux once installed.
Watching every network connection netstat -an ss -tuan Lists your machine's open ports and connections. Real data that looks very serious.
Seeing which programs are talking to the internet lsof -i lsof -i Lists network connections with the name of the program behind each one. Without sudo it only shows your own programs.
Enumerating devices on the network arp -a ip neigh Lists the IP and hardware addresses of devices your machine has recently talked to on the local network.
Pulling network credentials ifconfig ip addr Shows your own network adapters and their addresses.
Resolving the target's infrastructure dig google.com dig google.com A DNS lookup with a long, technical answer. Swap in any domain. On Linux it may need sudo apt install dnsutils; nslookup is the shorter alternative.
Capturing raw packets sudo tcpdump -i en0 sudo tcpdump -i any A live feed of your own network traffic. It asks for your password and only reads. On Macs, en0 is usually Wi-Fi.
Profiling the compromised system system_profiler lscpu && lsblk Prints hardware and software details. On a Mac it runs slowly for a minute or more and prints thousands of lines, which sells the effect.
Reading kernel messages sudo dmesg sudo dmesg -w Prints the kernel's startup and driver messages. On Linux, -w keeps waiting for new ones.
Identifying the target machine uname -a && sw_vers uname -a && cat /etc/os-release Prints the operating system, kernel version and architecture.
The window itself is compromised printf '\033]0;SYSTEM BREACH IN PROGRESS\007' printf '\033]0;SYSTEM BREACH IN PROGRESS\007' Renames the window. If you use Oh My Zsh, it may overwrite the title with its own.
Logged in as root PROMPT='root@mainframe:~# ' PS1='root@mainframe:~# ' Changes the prompt for this window only. It goes back to normal when you open a new window.
The computer announces the breach say "Access granted" spd-say "Access granted" Speaks the text out loud. The best finale there is. spd-say ships with most Linux desktops; espeak is the alternative.

Chain them for a sequence: rename the window, run system_profiler for the "profiling" stage, then netstat -an, then let /usr/bin/log stream run, and finish with say "Access granted".

Level up: four panes at once

The classic hacker shot is several feeds side by side. tmux splits one window into panes (brew install tmux or sudo apt install tmux). Start it with tmux, then:

Run a different command in each pane, such as top, ping 8.8.8.8, /usr/bin/log stream, and hexdump -C /dev/urandom. Type exit in each pane to close it. Without tmux, open four windows with Cmd + N and drag each one into a corner of the screen; macOS 15 and later snaps windows into quarters.

Make it green (and keep it green)

Three copy-paste scripts

To use one: type nano matrix.sh (or whatever name you like), paste the script, press Ctrl + O and Enter to save, then Ctrl + X to leave the editor. Run it with bash matrix.sh. Each one prints text and nothing else, and Ctrl + C stops it and resets the color.

Spam fake code with one line, no file

Paste this straight into Terminal. It works in both zsh and bash, and prints random numbers until you press Ctrl + C.

while :; do printf '%s ' $RANDOM $RANDOM $RANDOM $RANDOM $RANDOM $RANDOM; echo; done

Matrix rain in binary

Fills the window with green streams of 0s and 1s at the width of your terminal.

#!/bin/bash
# Endless green 0s and 1s. Press Ctrl+C to stop.
trap 'printf "\033[0m\n"; exit' INT
printf '\033[32m'
while :; do
  LC_ALL=C tr -dc '01  ' < /dev/urandom | head -c "$(tput cols)"
  echo
  sleep 0.03
done

For real falling katakana with color and speed controls, the Matrix rain effect runs in a browser tab. In the terminal, cmatrix does the same (brew install cmatrix or sudo apt install cmatrix).

Fake virus scan

Lists real system files one by one as if scanning them, then "finds" threats in red. It only reads file names.

#!/bin/bash
# Fake virus scan: lists real system files, then "finds" threats. Changes nothing.
trap 'printf "\033[0m\n"; exit' INT
printf '\033[32m\033]0;DEEP SYSTEM SCAN\007'
echo "Initializing heuristic engine..."
sleep 2
find /usr/lib /usr/share -type f 2>/dev/null | head -n 400 | while read -r f; do
  echo "[SCAN] $f"
  sleep 0.01
done
printf '\n\033[31m  !! 47 THREATS DETECTED !!\033[0m\n'

Breach with progress bars and ACCESS GRANTED

The full movie sequence: firewalls "bypassed" with progress bars, a stream of hex "records", and a boxed ACCESS GRANTED at the end. On a Mac, add say "Access granted" as the last line for sound.

#!/bin/bash
# Fake intrusion with progress bars. Prints text only.
trap 'printf "\033[0m\n"; exit' INT
printf '\033[32m\033]0;SYSTEM BREACH IN PROGRESS\007'
clear
for target in FIREWALL MAINFRAME DATABASE "ADMIN PANEL"; do
  printf '%-22s' "Bypassing $target"
  for i in $(seq 1 30); do printf '#'; sleep 0.04; done
  printf ' [ OK ]\n'
done
echo
echo "Downloading records..."
for i in $(seq 1 60); do
  printf '%04x  %08x %08x %08x  block %d/60\n' "$i" "$((RANDOM * RANDOM))" "$((RANDOM * RANDOM))" "$((RANDOM * RANDOM))" "$i"
  sleep 0.05
done
printf '\n\033[1m'
echo "  ╔══════════════════════════════╗"
echo "  ║        ACCESS  GRANTED       ║"
echo "  ╚══════════════════════════════╝"
printf '\033[0m\n'

Why these are safe: the scripts only use printf and echo (print text), tr, head and find (read data), sleep (wait), and clear. None of them write files, delete anything, download anything, or need sudo.

Funny Terminal commands to try next

Not every trick has to look like a break-in. These are the fun ones.

CommandWhat happens
say -v Whisper "I am inside your computer"macOS whispers it out loud. Run say -v '?' to list the voices installed on your Mac.
banner -w 40 HACKEDmacOS prints the word as a giant sideways banner made of # signs. On Linux, figlet HACKED does it the right way up (sudo apt install figlet).
curl ascii.live/parrotStreams a dancing ASCII party parrot. Also try ascii.live/rick. Needs an internet connection, because it downloads the animation from a public website.
curl wttr.inAn ASCII-art weather forecast for your location.
slA steam locomotive drives across the screen, the classic punishment for mistyping ls. Needs brew install sl or sudo apt install sl.
yes "YOU HAVE BEEN HACKED"Prints the line as fast as the terminal can draw it, forever. Ctrl + C stops it.
caffeinate -dmacOS only: stops the screen from sleeping while the prank runs. Ctrl + C to let it sleep again.
historyPrints the commands you've typed recently, for retracing the "attack".

The zero-effort option: a fake terminal that types itself

Real commands have a limit: they look like a log or a file listing, not an "intrusion in progress". For port scans, password cracking, and an ACCESS GRANTED banner, open the fake hacker terminal in a browser. Click START and go fullscreen, and realistic commands type and execute themselves. Nothing real runs, and it works on any computer or phone.

Other props for the same scene: the hacker typer writes code as fast as you mash the keys, the boot sequence simulator fakes a Linux boot log, and the system breached screen makes a good final jump-scare.

Can you actually hack with Terminal?

Not the way films show it. Terminal is just a way to run programs by typing their names, and the commands above are ordinary system tools reading your own machine. Real security work needs specialist tools, permission, and a lot of patience, and getting into systems you don't own is a crime in most countries. Keep the prank a prank: green text, a scrolling log, and a friend who isn't sure what they're looking at.

Terminal hacker prank FAQ

Is the Terminal hacker prank safe?

Yes. Every command and script on this page only reads and prints information, or changes cosmetic things like the text color, the window title, or the prompt for the current window. None of them delete, change, or install anything. Press Ctrl + C to stop a running command, or close the window.

What is the best Terminal command to look like a hacker on a Mac?

/usr/bin/log stream. It prints the Mac's live system log, hundreds of dense, technical lines a second, and keeps going until you press Ctrl + C. Open it in a green Homebrew window and go fullscreen with Ctrl + Cmd + F. On Linux, journalctl -f does the same job.

How do I make the Mac Terminal green?

Choose Shell > New Window > Homebrew for a green-on-black window. To make it permanent, open Terminal > Settings > Profiles, select Homebrew and click Default. For a quick change in any window, type printf '\033[32m' to turn the text green and printf '\033[0m' to reset it.

How do I make Terminal fullscreen?

On a Mac press Ctrl + Cmd + F, or click the green button in the window's corner. In most Linux terminals, press F11.

How do I spam fake code in the Mac Terminal?

Paste this line and press Enter: while :; do printf '%s ' $RANDOM $RANDOM $RANDOM $RANDOM $RANDOM $RANDOM; echo; done. It prints random numbers forever. For a wall of hex that looks like a memory dump, use hexdump -C /dev/urandom. Press Ctrl + C to stop either one.

Can you actually hack with the Terminal?

Not the way films show it. Terminal just runs programs by name, and the commands here are ordinary system tools reading your own machine. Real security work needs specialist tools and permission, and getting into systems you do not own is a crime in most countries.

Does this work on a Chromebook or iPad?

An iPad has no Terminal, and a school-managed Chromebook usually has its Linux terminal turned off. Use a browser instead: the fake hacker terminal types out a realistic intrusion by itself, and nothing is installed or run.

Prank responsibly

On Windows instead?

The CMD hacker prank guide has the Command Prompt version: 18 commands like color 0a and tree C:\, four .bat scripts, a CMD simulator you can try in the browser, and a 10-hour fake hacker screen video.