How to Make Your Linux Terminal More Colorful With lolcat

By default, the Linux terminal comes with a dull color scheme. Add colors to your Linux command line by installing lolcat.

The terminal can seem a little boring compared to flashier graphical Linux apps. lolcat is a program that adds some flair to your Linux terminal sessions. Here’s how to install and use lolcat on Linux.

What Is lolcat?

lolcat has nothing to do with lolcats. It’s a program that displays text in rainbow colors on your terminal. It’s similar to the cat utility: you can give it files from command-line arguments or pipe output into it.

How to Install lolcat on Linux

lolcat is easy to install using standard Linux package managers. For example, on Debian or Ubuntu:

sudo apt install lolcat

On RHEL, Fedora, and CentOS:

sudo dnf install lolcat

And on Arch Linux:

sudo pacman -S lolcat

Using lolcat to Add Colors to the Terminal

lolcat is simple enough to use in the terminal. You can use it like cat, as mentioned earlier. It takes standard input, meaning that you can call it from the Linux command line or feed files to it as input. If you run “lolcat” at the shell, it’ll print back whatever lines you type in color.

You can also supply a file name and lolcat will print its contents in rainbow colors as well:

lolcat file.txt

The real fun comes when you use it in pipelines. You can print out directory listings in vivid colors:

ls -laR | lolcat

Like many other command-line programs, lolcat has options you can tweak to adjust the output. The -a option displays a color-cycling animation before the line is printed. The -d and -s options control the length and speed of this animation.

The -p option will control the slant of the stripes. The -F option controls the frequency of the rainbow effect. The -t option enables 24-bit color, while -f forces color output (the options are case-sensitive, like in many other Linux commands). The -i option will invert the foreground and background colors, giving a rainbow background to your terminal text.

The Linux Command Line Can Be Fun!

While the command line is productive, you can make your Linux terminal pretty and have fun with the right tools like lolcat. The Linux terminal offers plenty of ways to goof off, like offering fun commands you can use when you’ve run out of things to do in the terminal.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button