Funny Linux Commands That Actually Work, With Install Steps and What They Teach

Many Linux users are surprised to learn that some terminal commands were created just for fun or humor. Commands like sl, cowsay, fortune, and cmatrix showcase the lighter side of Linux. These commands display ASCII animations, jokes, or quirky text effects that can brighten your terminal experience while still serving minor utility or creative scripting use.

Jul 23, 2025 - 11:52
Updated: 2 days ago
102.8k
Funny Linux Commands That Actually Work, With Install Steps and What They Teach

Quick answer: Safe funny Linux commands include sl (a steam train), cowsay (an ASCII cow), fortune (random quotes), cmatrix (falling green code), figlet (big text) and apt moo. Most install with one package command. They are harmless, and combining them with pipes teaches real shell skills. Never run joke commands that delete files or fork processes.

Key takeaways

  • Funny commands such as cowsay, sl, fortune and cmatrix are harmless packages you install first.
  • Pipes like fortune | cowsay teach standard input and output, which is real shell skill.
  • Package names and availability differ by distribution; RHEL-family systems may need the EPEL repository.
  • Never run rm -rf / or a fork bomb as a joke, and be wary of copy-pasted "funny" commands.
  • Use a virtual machine or lab for experiments.

Which funny Linux commands actually work?

These commands are small programs, mostly installed from your distribution's repository. They are harmless, and each one teaches something about how the terminal works.

CommandWhat it doesWhat it teaches
slRuns an ASCII steam locomotive across the screenIt exists as a joke for people who mistype ls; it shows how typos change commands
cowsayPrints your message in a speech bubble from an ASCII cowCommand arguments and standard input
fortunePrints a random quote or sayingReading from a file database; pipes
cmatrixShows falling green characters like a film terminalTerminal control and exiting with q or Ctrl+C
figletTurns text into large ASCII letteringOptions and fonts
yesPrints "y" or any string again and again until stoppedUsed legitimately to answer prompts automatically; shows endless output and Ctrl+C
revReverses each line of textFilters in pipelines
factor 360Prints the prime factors of a numberSmall utilities from GNU coreutils
apt mooPrints a cow and a joke about "Super Cow Powers" on Debian and UbuntuA long-standing Easter egg inside a package manager

How do you install them?

On Debian, Ubuntu and Kali, use the package manager:

sudo apt update
sudo apt install sl cowsay fortune-mod cmatrix figlet

On RHEL, Rocky Linux and AlmaLinux, some of these are in the EPEL repository. Enable it first and then use sudo dnf install cowsay. Package names can differ, so search with dnf search cowsay if the install fails. CentOS Linux is end-of-life, so use a supported distribution for practice.

Which pipes are fun and useful?

fortune | cowsay
echo "Hello WebAsha" | figlet
echo "stressed" | rev
cal | cowsay

Each line sends the output of one program into the input of another. That single idea, the pipe, is the basis of most command-line work, such as ps aux | grep nginx or journalctl | tail. The funny examples are a gentle way to learn it.

Which "funny" commands are dangerous?

Many forums share jokes that are really destructive. Treat the following as examples of what not to run:

  • rm -rf / and variations can delete the whole system; modern rm has safeguards, but variants and wildcards can still cause serious damage.
  • A fork bomb such as :(){ :|:& };: creates processes until the system hangs.
  • Commands that write to a disk device with dd or mkfs can destroy data.
  • Pasting commands you do not understand into a terminal, especially with sudo or piped from the internet into a shell.

A good habit is to read any command, ask what each part does, and test it in a virtual machine snapshot first.

What can you learn from these toys?

  1. Use man cowsay to read a manual page and learn the options.
  2. Use which sl and type sl to see where a command lives.
  3. Write a small shell script that prints a random fortune in a cow every time you open a terminal, then remove it when it gets annoying.
  4. Create an alias, for example alias ls='ls --color=auto', and see how aliases save typing.

Common mistakes

  • Running copied commands as root without reading them.
  • Expecting the same package names on every distribution.
  • Leaving cmatrix running and forgetting how to quit.
  • Practising on a machine that holds important data.

Next steps

When you are ready for serious commands, read the most useful Linux commands guide and the Bash scripting guide. For structured practice, see the Linux training course.

Related reading

Frequently Asked Questions

Popular ones are sl, cowsay, fortune, cmatrix, figlet and apt moo. They are harmless programs that mostly need installing. Combining them with pipes, such as fortune piped into cowsay, is a nice way to learn the shell.

The ones listed here are safe, but you should still read any command before running it. Joke commands such as rm -rf / or fork bombs are destructive, so test unfamiliar commands in a virtual machine snapshot, not on a real system.

Run sudo apt update and then sudo apt install cowsay. Afterwards, type cowsay followed by a message. On RHEL-family systems, enable the EPEL repository and use dnf install cowsay, or search with dnf search.

It is a joke for people who mistype ls as sl. Instead of listing files, a steam locomotive runs across the screen. It reminds you to type carefully and shows how small utilities can be installed as packages.

It prints a string repeatedly, "y" by default, until you stop it with Ctrl+C. It is useful for automatically answering confirmation prompts in scripts, though it can fill a screen very quickly.

Yes. They teach package installation, manual pages, arguments, pipes and aliases in a low-pressure way. Use them as a bridge to practical commands such as grep, find, ps and journalctl.

What's Your Reaction?

Like Like 0
Dislike Dislike 0
Love Love 0
Funny Funny 0
Wow Wow 0
Sad Sad 0
Angry Angry 0
Vaishnavi

Vaishnavi is a skilled tech professional at the Ethical Hacking Training Institute in Pune, responsible for managing and optimizing the technical infrastructure that supports advanced cybersecurity education. With deep expertise in network security, backend operations, and system performance, she ensures that practical labs, online modules, and assessments run smoothly and securely. Her behind-the-scenes contributions play a vital role in delivering a seamless and secure learning experience for aspiring ethical hackers.