In this post we will
learn to add a custom banner or header in our Terminal by using a free
program called FIGLet. This banner will appear on the terminal
whenever we open our terminal (as root).
Okay,
what is FIGLet? The name derives from letters of Frank, Ian and
Glenn. Its a free program written in C language and it commonly comes
included in Unix-like Operating Systems. It
generates text banners like composed of smaller ASCII charachters.
And yes we can use these banners in our terminal also.
Lets
do it.
-
Type “apt-get install figlet” in terminal and press enter to install FIGLet.
-
Now we type “figlet test banner” and press enter.
We can also use some
options with figlet to customize our output banner. Few options which
could be useful in making banner are like
-
-cIt centers the output.
-
-lIt can be used for left-side alignment of banner
-
-rIt can be used for right-side alignment
-
-tIt sets the output width to the terminal width
-
-wIt can be used to specify custom output width.
-
-fIt can be used to select a font file
-
-dFor changing the directory of fonts.
For example we type “figlet
-ct test banner” and press enter.
Now we have to add this
banner to our terminal so that when we open it will be shown on the
top. To do so we just have to append the command (like figlet -ct
test banner) in bashrc file.
It is a hidden file present
in our home directory. To find it type “ls -a” and press enter in
home directory.
We can open the bashrc file
in any text editor like vim or leafpad and add those command in the
last line of the file and save it. I am using leafpad for this time.
So i type leafpad '/root/.bashrc' and press enter.
After adding command save
and close it. Now if we open our terminal, we can see our custom
banner on the top.
Any code written in bashrc
file will execute automatically. Try it yourself and thanks for
reading.
Alok kumar
Nice article and well explained with all parameters. Good job and wish to see more and more advanced articles from you.
ReplyDeleteThanks for showing interest in my blog. will soon come with new posts.
DeleteAmazing write-up and useful info.
ReplyDeletehoping for more posts on core hacking :)
I will soon post some blogs related on core hacking. Stay Connected, and thanks for your suggestions.
Deletei saved my command in .bashrc file but it doesn't work when i open a terminal
ReplyDelete