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 Newsletter!
Get notified when new articles are published!
We promise to never share your email!
icon

Author: 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.

Leave a Reply

Your email address will not be published. Required fields are marked *

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.