DEV Community

LaTerral Williams
LaTerral Williams

Posted on

๐ŸŽจ Add Some Personality to Your Terminal with Figlet and Lolcat ๐ŸŒˆ

If you're new to Linux, you might be wondering how to make your terminal experience more fun or personalized. Thatโ€™s where two awesome tools come in: figlet and lolcat.

With these, you can turn boring terminal sessions into colorful and creative ones perfect for showing off your system with style!

Image description


Table of Contents


๐Ÿงพ What Youโ€™ll Learn

  • How to install figlet to generate ASCII art text
  • How to install lolcat to add rainbow colors
  • How to create a custom welcome banner that displays every time you open your terminal
  • How to include system info like hostname and uptime

๐Ÿ”ง Step 1: Install figlet

Letโ€™s start by installing figlet, which converts regular text into fun ASCII art.

โœ… Update your system first:

sudo dnf update -y
Enter fullscreen mode Exit fullscreen mode

โœ… Install EPEL (Extra Packages for Enterprise Linux):

sudo dnf install epel-release -y
Enter fullscreen mode Exit fullscreen mode

โœ… Now install figlet:

sudo dnf install figlet -y
Enter fullscreen mode Exit fullscreen mode

โœ… Test it out:

figlet "Hello CloudWhistler"
Enter fullscreen mode Exit fullscreen mode

You should see a big, bold ASCII message in your terminal.

Image description


๐ŸŒˆ Step 2: Add Color with lolcat

Now letโ€™s spice things up with lolcat, a tool that adds rainbow colors to your terminal output.

โœ… Install Ruby (needed for lolcat):

sudo dnf install ruby -y
Enter fullscreen mode Exit fullscreen mode

โœ… Install lolcat using Ruby:

sudo gem install lolcat
Enter fullscreen mode Exit fullscreen mode

โœ… Try it with figlet:

figlet "Red Hat Rocks!" | lolcat
Enter fullscreen mode Exit fullscreen mode

Now your ASCII art should show up in a rainbow of colors! ๐ŸŽ‰

Image description


๐Ÿ–ฅ๏ธ Step 3: Display Info and ASCII Art on Terminal Launch

Wouldnโ€™t it be cool if your welcome banner appeared automatically every time you opened a terminal? Letโ€™s do that!

โœ… Open your .bashrc file:

vim ~/.bashrc
Enter fullscreen mode Exit fullscreen mode

This file runs automatically when a new terminal session starts.

โœ… Add the following to the bottom of the file:

# === Custom RHEL 9 Terminal Banner ===
clear
figlet -f slant "Welcome CloudWhistler" | lolcat

# === Show System Info ===
echo "Hostname : $(hostname)" | lolcat
echo "Date     : $(date)" | lolcat
echo "Uptime   : $(uptime -p)" | lolcat
echo "Users    : $(who | wc -l)" | lolcat
echo "Kernel   : $(uname -r)" | lolcat
Enter fullscreen mode Exit fullscreen mode

โœ… Save and exit:

  • If you're using vim, try :w to save or :wq to save and quit.

โœ… Apply changes immediately:

source ~/.bashrc
Enter fullscreen mode Exit fullscreen mode

๐Ÿงช What It Looks Like

Hereโ€™s an example of what you'll see next time you open your terminal:

Image description

All beautifully rainbow-colored with lolcat. ๐ŸŒˆ


๐Ÿง  Final Thoughts

This is a simple way to personalize your Linux environment and learn about customizing your shell. Itโ€™s fun, educational, and a great stepping stone to more advanced terminal customizations.

๐Ÿ’ก Bonus Ideas:

  • Add a quote of the day
  • Display disk or memory usage
  • Customize the font style using figlet -f (try figlet -f script Hello!)

๐Ÿ› ๏ธ Tools Recap

Tool Description
figlet Converts text into ASCII art
lolcat Adds rainbow colors to terminal
.bashrc Script that runs at terminal start

Thanks for reading! If you liked this article, follow me for more beginner-friendly information.

๐Ÿ–ฅ๏ธ๐Ÿ’ฅ Letโ€™s make your terminal awesome.

Top comments (0)