Fun Linux Commands That Actually Work (and What They Teach You)
Linux has several fun terminal programs that really work: sl (a steam locomotive for anyone who mistypes ls), cowsay (an ASCII cow says your text), fortune (random quotes), cmatrix (falling green characters), figlet and toilet (large ASCII banners), lolcat (rainbow output) and oneko (a cat that chases your mouse). Most are not installed by default; install them from your package manager.
Topic: Linux Administration in IT Infrastructure · Lab / project
Quick answer: Linux has several fun terminal programs that really work: sl (a steam locomotive for anyone who mistypes ls), cowsay (an ASCII cow says your text), fortune (random quotes), cmatrix (falling green characters), figlet and toilet (large ASCII banners), lolcat (rainbow output) and oneko (a cat that chases your mouse). Most are not installed by default; install them from your package manager. They are a light way to practise pipes, package management and terminal basics. Never run "funny" commands from the internet that you do not understand, because some are destructive jokes.
Key takeaways
- Fun commands come from packages; installing them teaches package management.
- Combining them with pipes, as in
fortune | cowsay | lolcat, shows how Linux tools chain. - Some built-in GNU utilities are surprisingly playful too.
- Package names differ slightly between distributions.
- Commands such as
rm -rf /or fork bombs are not jokes; never run them.
Table of Contents
- Which Fun Commands Work, and How Do You Install Them?
- How Do You Combine Them with Pipes?
- Which Built-in Commands Are Fun Too?
- What Does Each One Teach?
- Which "Funny" Commands Are Dangerous?
- How Do You Add a Fun Login Message?
- References
Which Fun Commands Work, and How Do You Install Them?
| Command | What it does | Debian/Ubuntu package |
|---|---|---|
sl | Steam locomotive crosses the screen | sl |
cowsay | ASCII cow (or other animals with -f) says text | cowsay |
fortune | Random quote or joke | fortune-mod (plus fortunes) |
cmatrix | Falling characters like the film | cmatrix |
figlet, toilet | Large ASCII-art text | figlet, toilet |
lolcat | Rainbow-coloured output | lolcat |
oneko | A cat chases the mouse pointer (graphical desktop) | oneko |
espeak | Speaks text aloud | espeak-ng |
# Debian, Ubuntu, Kali
sudo apt update && sudo apt install -y sl cowsay fortune-mod fortunes cmatrix figlet toilet lolcat oneko
# Fedora (names may differ; some need extra repositories)
sudo dnf install -y sl cowsay fortune-mod cmatrix figlet
# Debian puts some games in /usr/games; add it to PATH if needed
export PATH="$PATH:/usr/games"
Check package details on packages.debian.org.
How Do You Combine Them with Pipes?
fortune | cowsay | lolcat # quote, said by a cow, in rainbow
figlet "WebAsha" | lolcat # big rainbow banner
cowsay -l # list available characters
fortune | cowsay -f tux # Tux the penguin says a quote
date | toilet -f term -F border # boxed date
The pipe | sends one program's output into the next program's input, the core idea of the Unix philosophy.
Which Built-in Commands Are Fun Too?
yes "Linux rocks" | head -5 # yes repeats text forever; head stops it
echo "racecar level" | rev # reverse characters
factor 2026 # prime factors: 2026: 2 1013
cal 9 1752 # September 1752: 11 days missing (calendar change)
shuf -n 1 -e rock paper scissors # random choice
These come from GNU coreutils and util-linux, and work on almost every distribution.
What Does Each One Teach?
| Command | Concept |
|---|---|
sl | Typos happen; try sl -e to allow Ctrl+C, learning about signals |
fortune | cowsay | Pipes and standard input/output |
cmatrix | Terminal capabilities and quitting full-screen apps with q |
yes | head | Infinite output and how downstream commands close pipes |
lolcat | ANSI colour codes in terminals |
| Installing them all | apt or dnf, PATH, and where binaries live |
Which "Funny" Commands Are Dangerous?
Online "jokes" sometimes trick beginners into damaging their systems:
rm -rf /or variants: deletes files; modern GNU rm refuses the bare root without--no-preserve-root, but variants still cause damage.- Fork bombs written as strings of punctuation: create processes until the system freezes.
ddcommands writing to/dev/sda: overwrite the disk.- Piping unknown URLs into
sh: runs whatever the server sends.
Rule: never run a command you cannot explain, especially with sudo. Look it up in the man pages first.
How Do You Add a Fun Login Message?
# Show a cow-delivered fortune each time you open a terminal (bash)
echo 'command -v fortune >/dev/null && fortune | cowsay' >> ~/.bashrc
source ~/.bashrc
Keep it to interactive shells on your own machine, not on shared servers or scripts. For serious tools, see Linux firewalls and Linux users and permissions. WebAsha offers Linux administration courses.
References
Frequently Asked Questions
What's Your Reaction?
Like
0
Dislike
0
Love
0
Funny
0
Wow
0
Sad
0
Angry
0