lolcat
Display text with rainbow color effects
TLDR
Print a file to the console in rainbow colors
Print the result of a text-producing command in rainbow colors
Print a file to the console with animated rainbow colors
Print a file to the console with 24-bit (truecolor) rainbow colors
SYNOPSIS
lolcat [OPTIONS] [FILE...]
COMMAND | lolcat [OPTIONS]
PARAMETERS
-h, --help
Display help message and exit.
-v, --version
Show version information and exit.
-F, --force
Force color output, even if stdout is not a TTY.
-f, --fast
Use a faster, less CPU-intensive color generation mode.
-p, --spread PERCENT
Set the spread of the rainbow (default is 3.0). Higher values create wider color bands.
-a, --animate
Enable animation of the rainbow effect.
-d, --duration DURATION
Set the duration of the animation in frames (default is 12). Only applicable with -a.
-s, --speed SPEED
Set the animation speed in frames per second (default is 20.0). Only applicable with -a.
-i, --invert
Invert the colors of the rainbow.
-S, --seed SEED
Set a specific random seed for color generation, useful for consistent output.
DESCRIPTION
lolcat is a command-line utility that applies a vibrant rainbow color effect to text output. It reads input from standard input (stdin) or specified files and writes the colorized output to standard output (stdout). Primarily designed for aesthetic purposes, lolcat transforms plain terminal text into eye-catching displays. It's frequently used to pipe the output of other commands, such as ls, cat, or echo, making their results more visually engaging. Beyond static coloration, lolcat can also animate the rainbow effect, creating a mesmerizing scrolling color pattern. While not a core system utility, it's a popular tool for adding a touch of fun and personalization to the Linux command-line experience, embodying the playful spirit of "lolspeak" and internet culture from which its name derives. It's particularly favored for demonstrations, terminal screenshots, or simply brightening up everyday command usage.
CAVEATS
While entertaining, lolcat should be used judiciously. Extensive animation on large outputs can consume significant CPU resources. It's primarily an aesthetic tool and not suitable for situations where clear, unformatted text is required, such as scripting or parsing outputs. Additionally, it's not a standard pre-installed utility on most Linux distributions and typically needs to be installed separately.
USAGE EXAMPLES
Here are some common ways to use lolcat to colorize your terminal output:
1. Colorize a simple text string:echo "Hello, Lolcat!" | lolcat
2. Apply rainbow colors to command output:ls -l | lolcat
3. Animate a file's content:cat my_file.txt | lolcat -a -s 50 -d 10
4. Invert the rainbow colors:ip a show dev eth0 | lolcat -i
INSTALLATION
lolcat is not typically part of standard Linux distributions. It can often be installed via your system's package manager (e.g., sudo apt install lolcat on Debian/Ubuntu, sudo pacman -S lolcat on Arch Linux) or as a Ruby gem (gem install lolcat) or Python package (pip install lolcat for a Python version).
HISTORY
The lolcat command originated as a Ruby gem, leveraging Ruby's capabilities for text processing and terminal manipulation. Its name is a playful nod to the popular internet meme "lolcat," combined with the common Unix command cat, which it often complements by piping output. Since its initial development, its unique and visually appealing output has led to its widespread adoption among Linux enthusiasts. While the original implementation was in Ruby, its popularity has inspired reimplementations in other programming languages like Python, making it accessible to an even broader user base across various environments. Its history reflects a blend of internet culture and practical command-line utility.