HackingPress

Tech Hackified!

How To Design Your Own ASCII Text Art To Show In Terminal

Hello friends,

I’m back again with an interesting tutorial.

Have you ever wondered how people set their names to appear on the top of the terminal?

Well…

I did, before writing this tutorial.

If you also wondered how do people make their terminal fancy then read the whole tutorial. You are about to find out how it is done.

Don’t worry, this is not manual work, we use a tool instead.

We are going to use a simple tool called figlet. With this tool, you can easily set your name to appear in the terminal. The tool can generate a fancy version of the text that you supply to it.

Step 1. Installing Figlet

1. First of all, run the command–apt-get install figlet. This will download the figlet package from the repository to your system

2. Once that’s done run the command figlet.

3. Then type any text like–hello and hit enter. You will see that the text has appeared in a fancy form.

running figlet

You can try inputting the text and hitting enter to see how your text will look. Then CTRL+C to exit from figlet.

Alternatively, you can also do like this–figlet <your-text> then hit enter.

alternative way to run figlet

Step 2. Setting Your Name In Terminal

So now you know, how your desired text will appear in the terminal. The next step is to set this fancy text to appear on the top of the terminal.

For this, you have to edit the .bashrc file which is located in /root directory. You can do locate .bashrc to find the location in your system.

So follow the steps below:

1. Open the .bashrc file. I used nano editor to open the file, you can use a text editor of your choice. The file is located in /root/.bashrc. You can use the command nano /root/.bashrc to open the file with nano editor.

2. Then simply go to the end of the file and input the command–figlet <your-text> like you did in the terminal.

editing .bashrc file with figlet command

3. Save the file.

4. Once that is done, open a new terminal and you’ll see that you desired text appears on the top.

your desired figlet text appears in the terminal

You can save the command as–figlet -c <your-text> if you would like the text to appear in the center.

Some Other Font Tricks

Use the command–figlet -f bubble <your-text> to show your text with bubble font style.

figlet example 2

Use the command–figlet -f banner <your-text> to show your text with bubble font style. I used the -w for setting the width of the output to 100. I set the width because normally running figlet was making the last words to be displayed on the next line.

figlet example 1

You can also check out the whole figlet manual if you want to learn more about using this tool.

I hope you learned something interesting and useful in this short tutorial. If you liked it please do share it with your friends.

Also, leave a comment below if you have any feedback for me.

Categories: Geek

Leave a Reply

Your email address will not be published. Required fields are marked *