Command Line

Let’s Have A Happy New Year In The Terminal

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 CTRL + ALT + T and your default terminal should open.

With your terminal now open, install ‘figlet’.

APT using distros:

sudo apt install figlet

YUM using distros:

sudo yum install figlet

DNF using distros:

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:

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:

figlet Happy New Year

The output of that command should look similar to this image:

See? You have your terminal saying Happy New Year! Festive, huh?!?

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:

nano hny

Add the following text:

Happy New Year

Now save the file with nano. That’s pretty easy, but I’ll show you. Just press CTRL + X, then Y, and then ENTER. That should save the file as ‘hny’ in whatever directory you were working in.

So, let’s use ‘figlet’ to show the contents of our ‘hny’ file:

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.

KGIII

Retired mathematician, residing in the mountains of Maine. I may be old and wise, but I am not infallible. Please point out any errors. And, as always, thanks again for reading.

View Comments

Recent Posts

Enable/Disable Your Network Interface

Today we'll cover one way to enable or disable your network interface in the Linux…

5 months ago

Check Your NIC Speed In The Terminal

Today's exercise is a nice and simple exercise where we check your NIC speed in…

5 months ago

Easily Monitor Your Wireless Connection

Have you ever wanted to easily monitor your wireless connection? Well, now you can learn…

6 months ago

Count The Files In A Directory

I think I've covered this before with the ls command but this time we'll count…

6 months ago

Get System Information With The ‘uname’ Command In Linux

Today we'll be learning about a basic Linux command that's known as 'uname' and it…

6 months ago

hardinfo Has Been Rebooted As hardinfo2

If you've used hardinfo in the past, it may interest you to know that hardinfo…

6 months ago