While catching up on some youtube videos for Hak5 I noticed that the host of the video had added a name banner at the top of his Linux Terminal. As usual instead of finishing the video I was currently watching I started to search online for methods on adding my own banner to the terminal to help me distinguish what system I am currently working on at a glance. It turns out you can make simple bash echo statements for simple ascii banners but an application named figlet (a command-line tool that creates ASCII text banners) seemed to pop up a lot while searching so figured I would give it a go instead of trying to track down rogue quotes in bash script.
As my Putty window shows I am connected to my linux server on my Raspberry Pi which happens to be running the Rasbian OS. If you want to follow along the below commands should work for any Debian based OS.
Verify Debian
If you would like to verify you are indeed using a Debian based linux disto you can run:
cat /etc/os-release
Install Figlet
To install Figlet on our Debian-based linux server we can use apt-get:
sudo apt-get install figlet
Test Figlet Output
Now that figlet is installed on our system let’s see how our name looks:
figlet "dorkwriter"
Time To Make This Permanent by Editing .bashrc
Since I am using the default bash shell, to add Figlet I need to edit .bashrc with my favorite editor nano.
nano ~/.bashrc
I will just add the following code to the bottom of my .bashrc file to generate the banner when bash first loads.
#Using figlet to generate a banner for my bash profile
figlet "dorkwriter"
Press Ctrl + X, Press Y, and then the Enter key to save the file.
Now every time you open a terminal you should get a cool ascii banner.