Today’s article is going to be just another fun article, where we have a happy New Year in the terminal. Why in the terminal? Because, why not in the terminal? If you want to celebrate the New Year holiday in the terminal, read on and see how.
You won’t learn much in this article, but it can tie back to a couple of previous articles. This is just a fun article. As for articles it might tie into, check these previous articles:
Add A Message Of the Day (MOTD) To SSH
How To: Show An SSH Banner
If you read those two articles, or somehow remember them, you’ll see a common theme mentioned – that is ‘ASCII’. ASCII stands for “American Standard Code for Information Interchange”. Or, in plain language, text.
Text, terminal, and a New Year celebration? Darned right, we’re gonna have fun. Well, maybe not too much fun… But, I promise it won’t be too educational.
Yes, I realize that there are a variety of calendars on the planet. Yes, I know that there are other New Year celebrations. If this isn’t your New Year holiday, though this will technically be posted on my New Year’s Eve day, you can save this article and celebrate it when your holiday rolls around.
So, with all that in mind, let’s go ahead and get into the article…
Happy New Year In The Terminal:
You guessed it, you need an open terminal! So, open one up. If you don’t know how to open the terminal, you can do so with your keyboard – just press
With your terminal now open, install ‘figlet’.
APT using distros:
1 | sudo apt install figlet |
YUM using distros:
1 | sudo yum install figlet |
DNF using distros:
1 | sudo dnf install figlet |
You may find ‘figlet’ available for other distros. If you do, you should install it before going on. You will need ‘figlet’ for the remainder of this article.
With ‘figlet’ now installed, you can check the man page:
1 | man figlet |
We’ll just be using a couple of features available with ‘figlet’, but the man page is pretty informative. You can do quite a bit with ‘figlet’.
Using figlet:
While still in your terminal, you can just use ‘figlet’ in its most basic form:
1 | figlet Happy New Year |
The output of that command should look similar to this image:
You can also use ‘figlet’ by loading the data from the file. It’s easy enough to use ‘figlet’ to display information from a file, I’ll show you. Let’s use one of my favorites, nano:
Let’s start by making the file:
1 | nano hny |
Add the following text:
1 | Happy New Year |
Now save the file with nano. That’s pretty easy, but I’ll show you. Just press
So, let’s use ‘figlet’ to show the contents of our ‘hny’ file:
1 | figlet -p < hny |
There you have it. If you go back to the article’s introduction, you’ll see a couple of links. In those instances, you can actually call ‘figlet’ to show the contents of a file, for things like an SSH banner. They all kinda tie together, if you want them to.
Closure:
And there you have it. You have another article. This time, you’ve learned nothing – except how to have a happy New Year in the terminal. Well, you’ve also learned a bit about ‘figlet’, which is nice. Either way, enjoy the holiday and thanks for sticking with me throughout the past year!
Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.
Happy New Year LT!