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.
sudo apt install figlet #Debian/Ubuntu sudo yum install figlet #CentOS/RHEL sudo dnf install figlet #Fedora 22+
- You can use the command plus the text that you want to transform as a banner or large text as shown below
- 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
We showed you how to install and use figlet to Create ASCII Text Banners in Terminal.