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)