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.
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.
| Command | What it does | What it teaches |
|---|---|---|
sl | Runs an ASCII steam locomotive across the screen | It exists as a joke for people who mistype ls; it shows how typos change commands |
cowsay | Prints your message in a speech bubble from an ASCII cow | Command arguments and standard input |
fortune | Prints a random quote or saying | Reading from a file database; pipes |
cmatrix | Shows falling green characters like a film terminal | Terminal control and exiting with q or Ctrl+C |
figlet | Turns text into large ASCII lettering | Options and fonts |
yes | Prints "y" or any string again and again until stopped | Used legitimately to answer prompts automatically; shows endless output and Ctrl+C |
rev | Reverses each line of text | Filters in pipelines |
factor 360 | Prints the prime factors of a number | Small utilities from GNU coreutils |
apt moo | Prints a cow and a joke about "Super Cow Powers" on Debian and Ubuntu | A 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; modernrmhas 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
ddormkfscan destroy data. - Pasting commands you do not understand into a terminal, especially with
sudoor 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?
- Use
man cowsayto read a manual page and learn the options. - Use
which slandtype slto see where a command lives. - 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.
- 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
What's Your Reaction?
Like
0
Dislike
0
Love
0
Funny
0
Wow
0
Sad
0
Angry
0