Working primarily in a Linux terminal or managing remote servers via SSH often involves staring at endless streams of monochrome text. Whether you are building an interactive command-line deployment script, configuring an informative server Message of the Day (MOTD), or personalising your shell prompt banner, presenting critical headers in high-visibility typography significantly enhances the terminal user experience.
Two of the most celebrated, reliable, and versatile utilities for generating large text banners and ASCII art in Unix-like environments are figlet and toilet. While figlet generates classic ASCII characters composed of standard typography glyphs, toilet serves as a modern enhanced superset capable of rendering Unicode fonts, colour formatting, and psychedelic ANSI filters. In this comprehensive guide, you will learn how to install both utilities, master custom fonts, apply colour gradients, and incorporate banners into your server login screens.
Installing figlet and toilet on Linux
Both utilities are available in standard software repositories across all major distributions.
On Debian, Ubuntu, and Linux Mint
sudo apt update && sudo apt install -y figlet toilet
On Fedora, RHEL, and Rocky Linux
sudo dnf install -y epel-release && sudo dnf install -y figlet toilet
On Arch Linux and Manjaro
sudo pacman -S figlet toilet
How to Generate ASCII Banners Using figlet
The figlet command takes arbitrary input strings and renders them into large decorative block letters using specialised FIGlet fonts (.flf files).
1. Basic Banner Generation
figlet "DIGITASH"
This outputs standard multi-line ASCII text directly to your terminal screen.
2. Centring Banner Output
To automatically centre your text banner based on the current width of your terminal window, use the -c switch:
figlet -c "SYSTEM ONLINE"
3. Selecting Alternative Fonts
FIGlet ships with numerous pre-installed typography layouts stored in /usr/share/figlet/. Use the -f flag to specify a font family:
figlet -f slant "DEVOPS CLOUD"
figlet -f shadow "SECURITY SCAN"
figlet -f banner "ALERT"
4. Listing Available Fonts
To discover all installed FIGlet fonts on your system, run:
showfigfonts
This command cycles through every installed font file and renders a visual sample in your terminal.
Enhancing Banners with toilet: Unicode, Colours, and Filters
While figlet is restricted to monochrome ASCII characters, toilet provides powerful ANSI escape sequencing, Unicode border framing, and chromatic filters.
1. Adding Border Frames Around Text
Use the -F border filter to enclose your text in a clean box:
toilet -f future -F border "PRODUCTION NODE"
2. Applying Colour and Gradient Filters
toilet includes dynamic filters that automatically colourise your text:
- Rainbow Filter: Transitions character colours smoothly across the visible spectrum:
toilet -f big --filter gay "WELCOME ADMIN" - Metal / Chrome Filter: Applies high-contrast metallic greyscale and cyan gradients:
toilet -f standard --filter metal "DATABASE SERVER"
3. Using Modern Unicode FIGlet Fonts
toilet can parse modern UTF-8 fonts with smooth vector-like character rendering:
toilet -f term -F border "CLUSTER READY"
Practical Automation: Customising Your Server MOTD
One of the most valuable operational uses of terminal banners is generating an eye-catching login banner when administrators log in via SSH.
- Create a custom dynamic MOTD script in Ubuntu or Debian:
sudo nano /etc/update-motd.d/01-custom-banner - Add the following shell commands:
#!/bin/sh echo "" toilet -f slant --filter metal "$(hostname -s)" echo "--------------------------------------------------------" echo " Kernel: $(uname -r) | Date: $(date)" echo "--------------------------------------------------------" echo "" - Save the file and exit the editor (Ctrl + O, then Ctrl + X).
- Grant execution permissions to the script:
sudo chmod +x /etc/update-motd.d/01-custom-banner - Test the script immediately:
sudo /etc/update-motd.d/01-custom-banner
Every time an administrator connects via SSH or opens a local TTY session, your custom ASCII hostname will render cleanly above system diagnostic metrics.
Piping Command Output Directly into Banners
Both figlet and toilet accept standard input (stdin), allowing you to pipe dynamic runtime variables and commands directly into decorative banners:
date +"%H:%M" | figlet -f big
whoami | toilet -f term -F border
Troubleshooting Common Character Wrapping Issues
- Unwanted Line Wrapping: If your banner breaks awkwardly across lines, specify an explicit terminal width using the
-wflag (e.g.figlet -w 120 "LONG STRING"). - Missing Font Errors: If a font name is not found, verify that the
.flffile exists inside/usr/share/figlet/or supply the absolute file path with the-fflag.
Using figlet and toilet in Linux elevates simple command-line scripts and server environments into polished, professional, and visually engaging workspaces.