Last Updated : 12 Sep, 2024
The 'banner' command in Linux is a simple yet powerful utility used to display text in large ASCII characters on the terminal. This command can be particularly useful for creating prominent messages or headings within scripts and outputs.
Syntax of the 'banner' Commandbanner textbanner 'Command' Examples in Linux
Let us take a look at some of the examples of the 'banner' Command in Linux to better understand the concept.
Example 1: Printing "1234567890" in large letters.This command prints the numbers 1234567890 in large characters on the terminal.
Example 2: Printing "GeeksforGeeks" in large ASCII CharactersThere are two things:
Each word is displayed up to the 10-character limit, with spaces allowed between words.
Example 4: Attempting to Print "1234567890123"Trying to print 1234567890123 in a single word but only 1234567890 will be printed on display.
Only the first 10 characters (1234567890) will be displayed, due to the command’s character limit.
Displaying Help InformationTo access the help information and additional options for the banner command, use:
info banner
or
man banner
It displays help information.
Alternatives and Limitations:Note: If the terminal shows banner not found, then in UBUNTU use 'sudo apt install sysvbanner' or 'sudo apt install banner' to download it.
While the 'banner' command is simple and effective, it lacks advanced customization options like different fonts or colors. If you require more complex ASCII art, consider using tools like 'figlet' or 'toilet', which provide greater flexibility and styling options.
ConclusionThe 'banner' command in Linux offers a quick way to print large ASCII text to the terminal, with usage and limited configuration. It’s perfect for creating simple, eye-catching messages in scripts or terminal sessions. Remember its limitations on character count and uppercase formatting when planning your use cases.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4