PQ
PQ.Hosting

Currency

The figlet Command in Linux: ASCII Art, Fonts, MOTD, and Colored Output

Author
PQ
March 16, 2026
3 min read
16 views

Most people run figlet once out of curiosity and forget it. Those who stick around find uses in server login banners, deploy scripts where stages need to stand out, documentation headers, and PS1. From installation to non-obvious scenarios.

Installation

Debian / Ubuntu / Mint:

sudo apt install figlet

RHEL / CentOS / Rocky:

sudo yum install figlet

Fedora:

sudo dnf install figlet

Arch Linux:

sudo pacman -S figlet

Basic Output

Convert a string to ASCII art:

figlet Hello

Multiple words:

figlet "Linux VPS"

From stdin — useful in pipes:

echo "DEPLOY" | figlet

Fonts: figlet Is Not Limited to One Style

The default font is standard. Find the directory where fonts are stored:

figlet -I2

List all available font files:

ls /usr/share/figlet/*.flf

Select a specific font with the -f flag:

figlet -f slant "Production"
figlet -f banner "ALERT"
figlet -f big "v2.0"

Common fonts available almost everywhere: standard, big, banner, slant, shadow, block, digital, lean.

Install an extended font pack (150+ fonts):

sudo apt install figlet-fonts figlet-fonts-extra

Key Flags

Center text based on terminal width:

figlet -c "Centered"

Align to the right:

figlet -r "Right"

Set width explicitly — useful when output goes to a file rather than a terminal:

figlet -w 120 "Wide output"

Horizontal layout — letters packed tightly without gaps:

figlet -k "Kerning"

Practical Use 1: Login Banner on a Server (MOTD)

/etc/motd is the file shown to every user at SSH login. Add a styled header:

figlet -f slant "MyServer" | sudo tee /etc/motd

Or use a dynamic MOTD script in /etc/update-motd.d/:

sudo nano /etc/update-motd.d/00-header
#!/bin/bash
figlet -f slant "$(hostname)"
echo ""
echo "  Ubuntu $(lsb_release -rs) | $(date)"

Make it executable:

sudo chmod +x /etc/update-motd.d/00-header

Now every login displays the hostname in large letters.

Practical Use 2: Mark Stages in a Deploy Script

#!/bin/bash

figlet "BUILD"
npm run build

figlet "TEST"
npm test

figlet "DEPLOY"
rsync -av dist/ user@server:/var/www/html/

figlet "DONE"

In a long deploy log, stages are visible at a glance without reading every line.

Practical Use 3: Colored ASCII Art With lolcat

figlet outputs characters only — color comes from lolcat:

sudo apt install lolcat
figlet "Rainbow" | lolcat

Rainbow animation:

figlet "LOADING" | lolcat -a -d 3

-a enables animation, -d 3 sets duration.

toilet: figlet With Color and Unicode Support

toilet is an alternative with extended capabilities. Supports colored filters without lolcat:

sudo apt install toilet

Colored output with a built-in filter:

toilet -f bigmono9 --filter border "Status: OK"

Border around text:

toilet -f standard -F border "WARNING"

Quick Reference

Task Command
Basic output figlet "text"
Choose a font figlet -f slant "text"
List fonts ls /usr/share/figlet/*.flf
Center output figlet -c "text"
Set width figlet -w 120 "text"
From a pipe echo "text" | figlet
SSH login banner figlet "text" | sudo tee /etc/motd
Colored output figlet "text" | lolcat
Border around text toilet -F border "text"
Install extra fonts sudo apt install figlet-fonts-extra

Share this article