Print a large banner on your terminal

January 17, 2006
I still remember those days clearly when I was taking a short term course in Unix. The Unix flavour being SCO Unix ver 5.0. The first command we were introduced to in Unix by the instructor was the 'banner' command.

'banner' is a command which prints a high resolution text banner on the system console or if you have a printer connected to your machine, you can redirect the output to the printer. This utility is available on all Linux / Unix platforms.

For example, to print my name as a large banner, I give the command as follows:
$ banner -w 60 Ravi
The above command will print my name on the console with a width of 60 characters. If the -w option is omitted, it prints my name in the default width of 102 characters. The character used to print the name is '#'.

Fig: My name printed on the terminal
You can also redirect the output to a printer as follows:
$ banner -w 60 Ravi > /dev/lp0
We had great fun by printing out a variety of text on the console using the banner command. In some ways, it is a pity that nowadays, the first thing a new user to Linux or Unix do is check out the GUI or the games installed in them.

6 comments:

  • Abhishek

    Ravi, I have been reading your blog for a long time. As a relative newbie, I can assure you that I am just loving Linux.

    However, as a newbie, I don't think that I would need the terminal. Just because some people know how to use the commands doesn't make me less than them. For a new user, most important is the eye candy or as you mentioned Games. I am content with what I have.

    My migration to Linux was mainly because I was sick and tired of Windows crashing. However, once I actually came to know about Open Source and it's philosphy; followed by Ubuntu coming in the mainstrea (roughly a year back), I then realised the perils of the closed system. Linux isn't trying to ape Microsoft's so called user friendliness, but if it helps me to work easier....I am all for GUI and the eye candy.

    Incidentally, can you get the information about KDE 4? I would love to know more. Keep up the great work. Your posts are worth it to invest time and energy.

  • Ravi

    Abhishek,
    I personally think it is worthwhile to invest some time to pick up some command line skills - newbie or not. For one, once you master a command line tool, in many instances, you realise that it is much faster to open up a terminal and use the command line tool rather than rely on a GUI.

    Secondly, different distributions have their own GUI front-end to do a particular task. So if you are used to doing things only the GUI way, you will feel lost when you switch distributions.

    As far as my remark on newbies favouring GUI and games was concerned, I was just being nostalgic and taking a trip down the memory lane. :) I have nothing against GUI or Games in Linux.

  • My banner accepts only '--help' as an option, and will not create the banner vertically. I have version 1.2.1.

  • Just a FYI, Arch Linux doesn't have this in any of the standard packages nor can I find it in any of the official repos. Not that I really want it but it might be useful info for any other Arch users wondering why it won't work.

  • Stephan Sokolow

    banner is from the bsd-games package, whatever your system may call it.

  • sawan

    Ravi,

    I am using RHEL 5. I tried using the command "banner".. but it says
    "bash: banner: command not found".
    what could be the problem?