If you're looking to add some fun and flair to your terminal, lolcat is a great choice. It reads input from standard input and writes it to standard output, coloring the text with a rainbow gradient. It's often used alongside commands like cowsay
or figlet
to create colorful and animated terminal messages.
How to Install Lolcat
Debian/Ubuntu:
sudo apt install lolcat or sudo snap install lolcat
Arch/Manjaro:
sudo pacman -S lolcat
Fedora:
sudo dnf install lolcat
macOS (Homebrew):
brew install lolcat
If your distro doesn't include it, you can install it via Ruby gem:
gem install lolcat
Basic Usage
You can use lolcat by piping text into it:
echo "This is colorful!" | lolcat
Use it with cowsay for fun messages:
cowsay "Hello Linux" | lolcat
Lolcat Parameters and Options
Lolcat supports several options to control how the output is displayed. Here's a quick reference:
Option | Description |
---|---|
-a , --animate |
Enable animation (scrolling rainbow) |
-d , --duration [SECONDS] |
Set duration of the animation |
-s , --speed [FLOAT] |
Set speed of the animation |
-f , --frequency [FLOAT] |
Color frequency (higher = faster gradient) |
-F , --force |
Force color output even when stdout is not a tty |
-v , --version |
Show version and exit |
Example: Animated Cowsay
Combine cowsay
with animated lolcat
:
cowsay "Tyopical cowsay output!" | lolcat -a

Troubleshooting
If lolcat shows no color, make sure your terminal supports ANSI colors and that you're not redirecting the output to a file or non-interactive shell. Add --force
if necessary:
echo "Force it!" | lolcat --force
Conclusion
Lolcat is a lightweight and fun tool that adds some life to your terminal. Whether you're customizing your shell greeting, writing scripts, or just showing off your setup with neofetch
, this rainbow output will definitely catch attention.
0 Comments