Skip to main content

How To Create ASCII Text Banners in the Terminal

There are 2 tools used for this purpose.
Figlet 
Toilet
Figlet is a simple command line utility for creating large letters out of ordinary text.
Toilet is a sub-command under figlet used for creating colourful large characters from ordinary text.Bot utilities are available in the default package manager. So in order to use them, they have to be installed.
Ubuntu/Debian
 sudo apt install figlet toilet  

CentOS/RHEL
 sudo yum install figlet toilet  

Fedora 22+
 sudo dnf install figlet toilet  

How To Use Figlet
After installing, all you need to do is provide the text you want to transform as an argument to figlet as shown below.
 figlet subscribe.com  

Other modifications that can be made to it include
Justification - Align text to the left, right or center
To create output at the center, use
 figlet -c example.com  

To create output to the right, use
 figlet -r example.com  

To create output to the left, use
 figlet -l example.com  

Define output width
Use -w to control the width of the output. The default width is 80 columns.
 figlet -w 80 I love Linux  

To use the full width of your terminal, type this command
 figlet -t example.com  

Space output 
For a more readable output, use -k to add a little space between the printed characters.Notice the difference from the output above.
 figlet -kt example.com  

Read input from a file
You can read text from a file using the -p option.
 $ echo "Today I will subscribe and comment"> youtube.txt  

 $ figlet -kp < youtube.txt   

Change output font
Specify the font you want to use with -f option.Font is a .fif or .tif file stored in /usr/share/figlet. You can check available fonts using the following command
 ls /usr/share/figlet  

To use your selected font, type the following in your terminal
 figlet -f slant "I love Linux"  


 figlet -f bubble "I love Linux"  

For more information on figlet you can refer to its man pages which can be accessed through the terminal using this command:
 man figlet  

How To Use Toilet
It transforms text to large ASCII characters.
 toilet like my page  

To change the font, use -f option. it reads fonts from the same source as figlet.
 toilet -kf script subscribe.com  

Metallic blue font use this command:
 toilet -f mono12 -F metal Subscribe  

For more information on toilet you can refer to its man pages which can be accessed through the terminal using this command:
man toilet

Comments