How to Create ASCII Text Banners in Terminal

Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

Introduction

We will show how to create ASCII text banners from plain text, command-line utility called FIGlet

FIGlet is a simple command-line utility for creating ASCII text banners or large letters out of ordinary text.

Install figlet

sudo apt install figlet     #Debian/Ubuntu
sudo yum install figlet     #CentOS/RHEL
sudo dnf install figlet     #Fedora 22+

Using figlet

  • You can use the command plus the text that you want to transform as a banner or large text as shown below
figlet UNIXCOP.COM
  • Use the -c flag to create the Banner at the center
figlet -c UNIXCOP.COM

Also use -l to set the output to the left or -r to print it to the right.

  • Control the output width with the -w switch, the default width is 80 columns.
figlet -w Hi UNIXCOP Visitors
  • Use the full width of your terminal with the -t 
figlet -t Hi UNIXCOP Visitors
  • Use the -k flag to add a little space between the printed characters
figlet -t -k Hi UNIXCOP Visitors
  • Also you can read text from a file using the -p option
figlet -kp < file.txt
  • You can specify another font, using the -f flag, fonts are stored in /usr/share/figlet.
ls -al /usr/share/figlet

For example I used font shadow.tlf and slant.tlf as shown below

figlet -f shadow UNIXCOP
figlet -f slant UNIXCOP

Conclusion

That’s it

We showed you how to install and use figlet to Create ASCII Text Banners in Terminal.

Thanks.

Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"
MQ-Jr
MQ-Jr
unixcop Admin

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest articles

Join us on Facebook