Banner Command in Linux: What Is It And How To Use It?

Banner command in Linux displays ASCII character strings in large size on the standard output. This is useful when you want to display a string to be seen when someone logs in using the terminal. The strings are created using the character ‘#’. This will become clear as we demonstrate the command here.

This will be a brief tutorial on how to use the banner command. It is very easy to use command and doesn’t offer any options or flags. To start, let’s go through the man page for banner once. Before we do that, we should install a banner command onto our Linux systems.

Installing the Banner Command in Linux

To install banner use the apt command as shown below:

 apt install sysvbanner

Output :

Installation
Installation

Man page for banner command

To display the man page, use the man command:

man banner

Output :

Banner Man Page
Banner Man Page

The description says that it only displays the first 10 characters.

Using the Banner Command

Let’s try using banner command to output some string to the terminal.

banner Hello

Output :

Hello
Hello

Let’s try printing another string.

banner LinuxForDevices

Output :

Output Banner

We can see that only the first 10 characters of the string are printed in the banner. This is in accordance with what we read above in the man page.

Luckily, We can output words into separate lines in the output using the banner command.

Output text across multiple lines using banner

Banner by default displays separate words across separate lines. So we just have to make sure that our string doesn’t have any word that has more than 10 characters.

We can see this by running the following command :

 banner Linux For Devices
Linux For Devices
Linux For Devices

Conclusion

This tutorial was about banner command in Linux. We used the command to display text in large size on the terminal screen. Hope you had fun learning with us.