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:

YUM using distros:

DNF using distros:

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:

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:

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

figlet displaying a banner in the terminal
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:

Add the following text:

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:

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.

How To: Display Your Fortune In The Terminal

Today’s article is just a silly article, one where you learn how to display your fortune in the terminal. It’ll be fun! It’ll also be quick and easy, probably. If you’re expecting anything serious, this is not the article for you. No… No, it is not!

Once in a while, we remember that all work and no play makes Jack a dull boy. Well, we don’t want to be a dull boy, so let’s do something that serves absolutely no benefit. Let’s just have unadulterated fun. It’s my site, I’ll do what I want!

To be fair, I’ve already cover this same topic. I shared how to use ‘cowsay’ with ‘fortune’. I suppose it’s cheating, but this time we’re just going to use the ‘fortune‘ aspect. Trust me, it’s a very different article.

Yes, it’s an excuse to have a quick and easy article. I had an easy article the last time and I still want an easy article. I don’t want to burnout and we’ve had more than 300 articles. So, an easy spell is nice. It’ll help prevent burnout. I’ll be over it in a day or two, I assume. (Note that I didn’t promise.)

Remember, a goal of the site is to be found by search. So, having a ‘fortune’ specific article isn’t a bad thing. Not everyone will want the silliness of ‘cowsay‘. (They not very fun people, but they’re people and they exist!)

So then, let’s just get going with the silliness…

Display Your Fortune In The Terminal:

Obviously, you need an open terminal! It’s right there in the title! 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 open, you need to install ‘fortune’. It’s probably available for those using apt and those using rpm based package managers. It may be available for others, but I have not checked. So, to install it:

On apt-based distros:

On rpm-based distros:

With ‘fortune’ happily installed, and feel free to try in other package managers – but leave a comment if they work, you can start with the basic ‘fortune’ command:

Now, as this is just a fun article, I’m actually going to cheat. I’m going to suggest you just use the man page to learn more:

See, this is why I wanted to cover ‘fortune’ by itself. There are a whole lot of options available for such a silly program. Of all of them, my favorite one is the -l flag. That one throws out longer fortunes, like this one:

See?!? The ‘fortune’ command is pure awesomeness! If you’re anything like a cat, or myself, you can bat at the fortune command (as though it was a balled up piece of paper) for way longer than what seems reasonable.

So, check that man page and have fun with ‘fortune’. For example, you can (with the default configuration – and you can do way more with ‘fortune’ than one might ever possibly wish) run one of the following commands:

So, have fun with it. I do! I revisit the command far more often than one might think a grown adult would. Even then, and my memory kinda sucks, I don’t think I’ve read them all. It’s a gift that keeps on giving.

Closure:

And there you have it… You can now display your fortune in the terminal. I mean, it’s probably not really your fortune – but that doesn’t mean you can’t have some fun with it. Life is short, but not too short to have some fun in the Linux terminal.

By the way, like the last article, this article was prompted by an recent article on a forum I frequent. Nobody mentioned the ‘fortune’ command, so I figured I’d return to it and try to give it some justice. It’s a fun application with way more  options than it needs – and that’s awesome.

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.

Subscribe To Our Newsletter
Get notified when new articles are published! It's free and I won't send you any spam.
Linux Tips
Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.