34

I've seen people using the terminal command: banner. This creates big ascii-art-style text.

When I try to run it, however, the terminal says it doesn't exist. Why?

How do I install it? Are there any alternatives?

0

7 Answers 7

39

I've always preferred figlet for big writing. Something about it preserves the character shape better. A bit subjective but there you go. Simple enough:

$ sudo apt-get install figlet
$ figlet oh hai!
       _       _           _ _ 
  ___ | |__   | |__   __ _(_) |
 / _ \| '_ \  | '_ \ / _` | | |
| (_) | | | | | | | | (_| | |_|
 \___/|_| |_| |_| |_|\__,_|_(_)

(It looks better in a terminal than it does here)

There are a ton of formatting options too that make it suitable for lots of different situations. It does this through "fonts" (standard, slant, shadow, small, smslant, bubble, digital, mini, etc). man figlet has a full listing of available styles and formatting options but here are a few examples:

$ figlet -f slant Hooah!
    __  __                  __    __
   / / / /___  ____  ____ _/ /_  / /
  / /_/ / __ \/ __ \/ __ `/ __ \/ / 
 / __  / /_/ / /_/ / /_/ / / / /_/  
/_/ /_/\____/\____/\__,_/_/ /_(_)   

$ figlet -f smslant Hooah!
   __ __               __   __
  / // /__  ___  ___ _/ /  / /
 / _  / _ \/ _ \/ _ `/ _ \/_/ 
/_//_/\___/\___/\_,_/_//_(_)  

$ figlet -f bubble Hooah!
  _   _   _   _   _   _  
 / \ / \ / \ / \ / \ / \ 
( H | o | o | a | h | ! )
 \_/ \_/ \_/ \_/ \_/ \_/ 

$ figlet -f mini Hooah!

|_| _  _  _.|_ | 
| |(_)(_)(_|| |o 
7
  • Both of you used the same command at the same time , so cant decide whose first. Any way Thank you for answering. +1
    – Raja G
    Dec 17, 2013 at 13:40
  • look at my new answer , you can find something really cool
    – Raja G
    Dec 17, 2013 at 14:05
  • You are a treasure-trove of knowledge! Installed 190 KB package... ;-)
    – Fabby
    Feb 2, 2015 at 16:05
  • figlet usually comes packaged with the showfigfonts tool that output font samples. Jan 11, 2020 at 10:48
  • 1
    @MarcoPanichi It's in the Ubuntu "universe" repo. I'm not sure if that's enabled on WLS but if it's not, run sudo add-apt-repository universe, update and try again.
    – Oli
    Nov 27, 2022 at 23:19
18

You need to install it before you can use it. Type in the terminal:

sudo apt-get install sysvbanner

This Package is not available in the standard installation and for this is why you have to install it manually.

15

If you wish to use other "fonts" / ASCII art for a banner, you could also look at figlet:

sudo apt-get install figlet

foo@bar:~$ figlet
hi
 _     _
| |__ (_)
| '_ \| |
| | | | |
|_| |_|_|

cheers

sc.

4
14

Found one more named as toilet.

sudo apt-get install toilet

Then run

toilet -f bigmono9 -F gay <your string>

For Example:

enter image description here

2
  • 1
    that's a good suggestion, had never heard of that. thanks. Dec 17, 2013 at 14:15
  • 1
    looks like toilet-paper to me. Colorful at that. Dec 17, 2013 at 14:24
5

Alternative (without installing anything)

  1. Go to https://duckduckgo.com
  2. In search bar type: figlet YOUR BANNER HERE
  3. Copy the figlet and use it in the Bash script

Example Bash code:

#!/bin/bash

printf "
    YOUR FIGLET BANNER HERE
"
0
4

Open your terminal and paste as

 sudo apt-get install sysvbanner

Usage:

 banner <yourstring>

Example:

enter code here

4
  • Intersting, what would I be used for? Just wondering... Dec 17, 2013 at 13:39
  • @RPiAwesomeness where ever you want , for example in bash scripts # stands for commenting & there you can have your identity.
    – Raja G
    Dec 17, 2013 at 13:42
  • 1
    @RPiAwesomeness printers! We used to use this to create banners for printers and put some fancy info on the 1st page.
    – Rinzwind
    Dec 17, 2013 at 15:14
  • I'm a fan of the sysvbanner source. its 160 lines of C, and most of that is an array of 7x8 glyphs. you or anyone could simply make an alternate. I just moded the underscore to be blank, and the max line length to be 20, then I can write longer banners with underscores showing up as spaces. I wonder if I can feed it ascii arts like nyancat to make Huge nyancat banners.
    – j0h
    Jul 20, 2021 at 20:16
0

Another (longer) option that might be helpful if there's any nodejs involvement is ascii-banner. It's a node library but it can be scripted out.

$ sudo apt-get install npm
$ sudo npm -g install ascii-banner
$ node -e "var AsciiBanner = require('ascii-banner');AsciiBanner.write('Oh hai').out();"
  ______    __    __      __    __       ___       __  
 /  __  \  |  |  |  |    |  |  |  |     /   \     |  | 
|  |  |  | |  |__|  |    |  |__|  |    /  ^  \    |  | 
|  |  |  | |   __   |    |   __   |   /  /_\  \   |  | 
|  `--'  | |  |  |  |    |  |  |  |  /  _____  \  |  | 
 \______/  |__|  |__|    |__|  |__| /__/     \__\ |__| 

It also has font options:

$ node -e "require('ascii-banner').write('Oh hai').font('Thin').out();"

,---.|        |         o
|   ||---.    |---.,---..
|   ||   |    |   |,---||
`---'`   '    `   '`---^`
2
  • Long but okay , what are the features ?
    – Raja G
    Dec 17, 2013 at 13:57
  • npmjs.org/package/ascii-banner#readme.color(...) and alignment and before(...) and after(...) (again, with alignment and colour) arguments.
    – Oli
    Dec 17, 2013 at 14:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .