In technology terms, an Easter egg is a hidden message or feature in a piece of software that, when triggered, prints or does something inoffensive and fun. In many cases, these messages credit someone for their work or pay tribute to a person or a piece of art like a novel or a movie. In other cases, it's just a hidden message that requires a special circumstance to be triggered.
Although Easter eggs are usually hidden and undocumented, for this article I am using a looser definition that includes terminal programs that are fun and may surprise you if you're not familiar with them.
1. Vim knows…
The Vim text editor knows the answer to the Meaning of Life. If you also want to know it, open Vim, then type :help 42
and see for yourself.
Alternatively, you can launch Vim straight into that help page:
vim +h42
This is Vim's way to pay homage to the classic comedy science fiction novel The Hitchhiker's Guide to the Galaxy by the late Douglas Adams.
This Easter egg also works in Neovim.
2. Try Ansible Cowsay
The program cowsay
is a popular fun Linux command that generates ASCII art of a cow "saying" anything the user inputs when calling it. This program is so popular that I do not even consider it to be an Easter egg.
But what you may not know is, if you have cowsay
installed on your computer and you run an Ansible playbook on the command line, Ansible uses it to print the task names for a fun and surprising output:
$ ansible-playbook playbook.yaml
< PLAY [Test playbook] >
----------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
__________________________
< TASK [Print Hello World] >
--------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
ok: [localhost] => {
"msg": "Hello World!"
}
____________
< PLAY RECAP >
------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
localhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
[ How well do you know Linux? Take a quiz and get a badge. ]
3. Learn from your mistakes
If you're around the Linux or Unix terminal for a while, you've probably mistyped the command ls
as sl
many times when trying to list the contents of your directory. This is inoffensive and not too annoying; just retype the command and move on.
This experience changes if you install a nifty little program called sl
:
sudo dnf install -y sl
The next time you make that mistake, you see a fun steam locomotive cross your terminal:
4. Play Emacs games
Among the many many things you can do with the Emacs text editor, you can also play games! To see a list of available games, list the contents of directory /usr/share/emacs/*/lisp/play
:
$ cd /usr/share/emacs/*/lisp/play
$ ls *.elc
5x5.elc decipher.elc gamegrid.elc life.elc spook.elc
animate.elc dissociate.elc gametree.elc morse.elc studly.elc
blackbox.elc doctor.elc gomoku.elc mpuz.elc zone.elc
bubbles.elc dunnet.elc handwrite.elc snake.elc
cookie1.elc fortune.elc hanoi.elc solitaire.elc
To play one of these games, start Emacs, press Esc + x to execute a program, and type the name of the game you want to play:
M-x 5x5
+--------------------------+
| .... .... .... .... .... |
| .... .... .... .... .... |
| .... .... .... .... .... |
| .... .... #### .... .... |
| .... .... #### .... .... |
| .... .... #### .... .... |
| .... #### #### #### .... |
| .... #### #### #### .... |
| .... #### #### #### .... |
| .... .... #### .... .... |
| .... .... #### .... .... |
| .... .... #### .... .... |
| .... .... .... .... .... |
| .... .... .... .... .... |
| .... .... .... .... .... |
+--------------------------+
On: 5 Moves: 0
Some of these games are interesting, so give them a try!
[Cheat sheet: Old Linux commands and their modern replacements. ]
5. Get more color in your life
Is your terminal dull and monochromatic?
The little program lolcat
can fix that. Install it:
sudo dnf install -y lolcat
Then use it on a file or pipe the output of any program to lolcat
for a more colorful experience:
6. Set your terminal on fire
Well, not really, but using aafire
, you can see the effects of an ASCII flame animation on your terminal:
You can also combine that with lolcat
for colorful flames:
7. Transform your terminal into an aquarium
If instead of flames, you prefer something more peaceful, asciiaquarium
transforms your terminal into a lively aquarium with a variety of aquatic life and a few surprises:
8. Explore the zen of Python
Python hides a few Easter eggs. One of them is "The zen of Python," a list of 19 guiding principles to make your Python programming more effective. If you don't know or don't remember them, open a Python interactive session and type import this
to see that list:
$ python
Python 3.11.2 (main, Feb 8 2023, 00:00:00) [GCC 12.2.1 20221121 (Red Hat 12.2.1-4)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import this
The Zen of Python, by Tim Peters
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
>>>
Collect all the eggs
Your Linux terminal doesn't have to be monochromatic and boring. Try these 8 Linux Easter eggs and add some color and fun to your command line.
[ Want to test your sysadmin skills? Take a skills assessment today. ]
About the author
Ricardo Gerardi is Technical Community Advocate for Enable Sysadmin and Enable Architect. He was previously a senior consultant at Red Hat Canada, where he specialized in IT automation with Ansible and OpenShift.
He has been a Linux and open source enthusiast and contributor for over 20 years. He is currently interested in hacking stuff using the Go programming language, and he's the author of Powerful Command-Line Applications in Go: Build Fast and Maintainable Tools. Ricardo also writes regularly about Linux, Vim, and command line tools for Opensource.com and Enable Sysadmin community publications.
Ricardo enjoys spending time with his daughters, reading science fiction books, and playing video games.
Browse by channel
Automation
The latest on IT automation for tech, teams, and environments
Artificial intelligence
Updates on the platforms that free customers to run AI workloads anywhere
Open hybrid cloud
Explore how we build a more flexible future with hybrid cloud
Security
The latest on how we reduce risks across environments and technologies
Edge computing
Updates on the platforms that simplify operations at the edge
Infrastructure
The latest on the world’s leading enterprise Linux platform
Applications
Inside our solutions to the toughest application challenges
Original shows
Entertaining stories from the makers and leaders in enterprise tech
Products
- Red Hat Enterprise Linux
- Red Hat OpenShift
- Red Hat Ansible Automation Platform
- Cloud services
- See all products
Tools
- Training and certification
- My account
- Customer support
- Developer resources
- Find a partner
- Red Hat Ecosystem Catalog
- Red Hat value calculator
- Documentation
Try, buy, & sell
Communicate
About Red Hat
We’re the world’s leading provider of enterprise open source solutions—including Linux, cloud, container, and Kubernetes. We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.
Select a language
Red Hat legal and privacy links
- About Red Hat
- Jobs
- Events
- Locations
- Contact Red Hat
- Red Hat Blog
- Diversity, equity, and inclusion
- Cool Stuff Store
- Red Hat Summit