Linux ASCII Text Banners

From Ever changing code
Jump to navigation Jump to search

FIGlet is a program for creating Linux ASCII text banners. It may come pre-installed within your distribution but if not install a FIGlet utility.

Install

In Ubuntu, Debian, Linux Mint etc.

$ sudo apt-get install figlet

In CentOS, RHEL, Fedora etc.

$ yum install figlet

Generate ASCII Text Banners

Default output
$ figlet CiscoLinux.co.uk
  ____ _               _     _                                   _
 / ___(_)___  ___ ___ | |   (_)_ __  _   ___  __  ___ ___  _   _| | __
| |   | / __|/ __/ _ \| |   | | '_ \| | | \ \/ / / __/ _ \| | | | |/ /
| |___| \__ \ (_| (_) | |___| | | | | |_| |>  < | (_| (_) | |_| |   <
 \____|_|___/\___\___/|_____|_|_| |_|\__,_/_/\_(_)___\___(_)__,_|_|\_\
Change the font

To change the font, use the -f option, for example :

$ figlet -f digital CiscoLinux.co.uk

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|C|i|s|c|o|L|i|n|u|x|.|c|o|.|u|k|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Use the -c option if you would prefer centred output :

$ figlet -c "CiscoLinux.co.uk"
List FIGlet Fonts
$ showfigfonts
Download additional fonts
$ wget http://www.figlet.org/fonts/univers.flf or wget http://www.jave.de/figlet/figletfonts40.zip
$ unzip figletfonts40.zip
$ figlet -f fonts/isometric3.flf "Linux"
                               ___           ___           ___
                 ___          /__/\         /__/\         /__/|
                /  /\         \  \:\        \  \:\       |  |:|
 ___     ___   /  /:/          \  \:\        \  \:\      |  |:|
/__/\   /  /\ /__/::\      _____\__\:\   ___  \  \:\   __|__|:|
\  \:\ /  /:/ \__\/\:\__  /__/::::::::\ /__/\  \__\:\ /__/::::\____
 \  \:\  /:/     \  \:\/\ \  \:\~~\~~\/ \  \:\ /  /:/    ~\~~\::::/
  \  \:\/:/       \__\::/  \  \:\  ~~    \  \:\  /:/      |~~|:|~~
   \  \::/        /__/:/    \  \:\        \  \:\/:/       |  |:|
    \__\/         \__\/      \  \:\        \  \::/        |  |:|
                              \__\/         \__\/         |__|/
Create ASCII Art From Text

If you would like to display the output of a command using FIGlet, simply pipe the command into FIGlet :

$ date +%r | figlet -f banner
 
  ###    #####   #  ####### #######  #    ###     ###         #    #     #
 #   #  #     # ### #       #       ###  #   #   #   #       # #   ##   ##
#     #       #  #  #       #        #  #     # #     #     #   #  # # # #
#     #  #####      ######  ######      #     # #     #    #     # #  #  #
#     #       #  #        #       #  #  #     # #     #    ####### #     #
 #   #  #     # ### #     # #     # ###  #   #   #   #     #     # #     #
  ###    #####   #   #####   #####   #    ###     ###      #     # #     #
$ echo "WTF ?" | figlet -f smslant
 _      ____________  ___
| | /| / /_  __/ __/ /__ \
| |/ |/ / / / / _/    /__/
|__/|__/ /_/ /_/     (_)
If FIGlet gets its input from a file, use -p option
$ cat myfile
CiscoLinux
$ figlet -p < myfile
  ____ _               _     _
 / ___(_)___  ___ ___ | |   (_)_ __  _   ___  __
| |   | / __|/ __/ _ \| |   | | '_ \| | | \ \/ /
| |___| \__ \ (_| (_) | |___| | | | | |_| |>  <
 \____|_|___/\___\___/|_____|_|_| |_|\__,_/_/\_\

References