How to make your Linux terminal more colorful with lolcat

0

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

The terminal can look a bit boring compared to flashier graphical Linux apps. lolcat is a program that adds 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 is a program that displays text in the colors of the rainbow on your terminal. It’s similar to the cat utility: you can give it files from command line arguments or pipe output to 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 terminal

lolcat is quite simple to use in the terminal. You can use it as a chat, as mentioned earlier. It takes standard input, which means you can call it from the Linux command line or provide it with files as input. If you run “lolcat” on the shell, it will print all the lines you type in color.

You can also provide a filename and lolcat will also print its contents in rainbow colors:

lolcat file.txt

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

ls -laR | lolcat

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

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


The Linux command line can be fun!

As long as the command line is productive, you can spruce up your Linux terminal and have fun with good tools like lolcat. The Linux terminal offers many ways to have fun, like providing fun commands you can use when you have nothing left to do in the terminal.

Share.

Comments are closed.