• Contact
  • Contact Us
  • Disclamer
  • Home 1
  • Home 2
  • Home 3
  • Privacy Policy
Friday, May 9, 2025
How VPS - How to use/setup VPS
  • Login
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System Linux

Lolcat – A Command Line Tool to Output Rainbow Of Colors in Linux Terminal

How VPS by How VPS
November 2, 2018
in Linux, Operating System
0
0
SHARES
64
VIEWS
Share on FacebookShare on Twitter

Contents

  1. What is lolcat?
  2. Installation of Lolcat in Linux
  3. Usage of Lolcat
    1. Sample Output

For those who believe that Linux Command Line is boring and there isn’t any fun, then you’re wrong here are the articles on Linux, that shows how funny and naughty is Linux..

  1. 20 Funny Commands of Linux or Linux is Fun in Terminal
  2. 6 Interesting Funny Commands of Linux (Fun in Terminal)
  3. Fun in Linux Terminal – Play with Word and Character Counts

Here in this article, I will be discussing about a small utility called “lolcat” – Which produce rainbow of colors in terminal.

Lolcat – A Command Line Tool to Output Rainbow Of Colors in Linux Terminal

Lolcat Command to Output Rainbow of Colors for Terminal

What is lolcat?

Lolcat is an utility for Linux, BSD and OSX which concatenates like similar to cat command and adds rainbow coloring to it. Lolcat is primarily used for rainbow coloring of text in Linux Terminal.

Installation of Lolcat in Linux

1. Lolcat utility is available in the repository of lots of Linux distributions, but the available version bit older. Alternatively you can download and install latest version of lolcat from git repository.

Lolcat is a ruby gem hence it is essential to have latest version of RUBY installed on your system.

# apt-get install ruby		[On APT based Systems]
# yum install ruby		[On Yum based Systems]
# dnf install ruby		[On DNF based Systems]

Once ruby package has been installed, make sure to verify the version of ruby installed.

# ruby --version

ruby 2.1.5p273 (2014-11-13) [x86_64-linux-gnu]

2. Next download and install the most recent version of lolcat from the git repository using following commands.

# wget https://github.com/busyloop/lolcat/archive/master.zip
# unzip master.zip
# cd lolcat-master/bin
# gem install lolcat

Once lolcat is installed, you can check the version.

# lolcat --version

lolcat 42.0.99 (c)2011 [email protected]

Usage of Lolcat

3. Before starting usage of lolcat, make sure to know the available options and help using following command.

# lolcat -h
Lolcat – A Command Line Tool to Output Rainbow Of Colors in Linux Terminal

Lolcat Help

4. Next, pipeline lolcat with commads say ps, date and cal as:

# ps | lolcat
# date | lolcat
# cal | lolcat
Lolcat – A Command Line Tool to Output Rainbow Of Colors in Linux Terminal

ps Command Output

Lolcat – A Command Line Tool to Output Rainbow Of Colors in Linux Terminal

Date Output

Lolcat – A Command Line Tool to Output Rainbow Of Colors in Linux Terminal

Calendar Output

5. 3. Use lolcat to display codes of a script file as:

# lolcat test.sh
Lolcat – A Command Line Tool to Output Rainbow Of Colors in Linux Terminal

Display Codes with Lolcat

6. Pipeline lolcat with figlet command. Figlet is a utility which displays large characters made up of ordinary screen characters. We can pipeline the output of figlet with lolcat to make the output colorful as:

# echo I ❤ Tecmint | lolcat
# figlet I Love Tecmint | lolcat
Lolcat – A Command Line Tool to Output Rainbow Of Colors in Linux Terminal

Colorful Text

Note: Not to mention that ❤ is an unicode character and to install figlet you have to yum and apt to get the required packages as:

# apt-get figlet 
# yum install figlet 
# dnf install figlet

7. Animate a text in rainbow of colours, as:

$ echo I ❤ Tecmint | lolcat -a -d 500
Lolcat – A Command Line Tool to Output Rainbow Of Colors in Linux Terminal

Animated Text

Here the option -a is for Animation and -d is for duration. In the above example duration count is 500.

8. Read a man page (say man ls) in rainbow of colors as:

# man ls | lolcat
Lolcat – A Command Line Tool to Output Rainbow Of Colors in Linux Terminal

List Files Colorfully

9. Pipeline lolcat with cowsay. cowsay is a configurable thinking and/or speaking cow, which supports a lot of other animals as well.

Install cowsay as:

# apt-get cowsay
# yum install cowsay
# dnf install cowsay

After install, print the list of all the animals in cowsay as:

# cowsay -l
Sample Output
Cow files in /usr/share/cowsay/cows:
apt beavis.zen bong bud-frogs bunny calvin cheese cock cower daemon default
dragon dragon-and-cow duck elephant elephant-in-snake eyes flaming-sheep
ghostbusters gnu head-in hellokitty kiss kitty koala kosh luke-koala
mech-and-cow meow milk moofasa moose mutilated pony pony-smaller ren sheep
skeleton snowman sodomized-sheep stegosaurus stimpy suse three-eyes turkey
turtle tux unipony unipony-smaller vader vader-koala www

Output of cowsay pipelined with lolcat and ‘gnu‘ cowfile is used.

# cowsay -f gnu ☛ Tecmint ☚ is the best Linux Resource Available online | lolcat
Lolcat – A Command Line Tool to Output Rainbow Of Colors in Linux Terminal

Cowsay with Lolcat

Note: You can use lolcat with any other command in pipeline and get colored output in terminal.

10. You may create alias for the most frequently used commands to get command output in rainbow of colors. You can alias ‘ls -l‘ command which is used for long list the contents of directory as below.

# alias lolls="ls -l | lolcat"
# lolls
Lolcat – A Command Line Tool to Output Rainbow Of Colors in Linux Terminal

Alias Commands with Colorful

You may create alias for any command as suggested above. To create permanent alias, you have to add the relevant code (above code for ls -l alias) to ~/.bashrc file and also make sure to logout and login back for the changes to be taken into effect.

That’s all for now. I would like to know if you were aware of lolcat previously? Did you like the post? And suggestion and feedback is welcome in the comment section below. Like and share us and help us get spread.

Source: tecmint.com

Tags: Linux Commandslinux guidelinux vps setup guide
Previous Post

14 Useful Examples of Linux ‘sort’ Command – Part 1

Next Post

2 Useful Tools to Find and Delete Duplicate Files in Linux

Next Post

2 Useful Tools to Find and Delete Duplicate Files in Linux

Leave a Reply Cancel reply

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

No Result
View All Result

Recent Post

Install Imagemagick on CentOS
CentOS

Install Imagemagick on CentOS

by How VPS
June 28, 2023
0

This is how I installed Imagemagick on a vanilla CentOS server Start off by installing the prerequisites yum install php-pear...

Read more
how to Check phpinfo

How to Check phpinfo of Hosting or VPS?

June 28, 2023
Failed to download metadata for repo 'appstream' on Centos 8

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020

Recent News

  • Install Imagemagick on CentOS
  • How to Check phpinfo of Hosting or VPS?
  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

Category

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel
  • About
  • Advertise
  • Careers
  • Contact

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Thabet