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
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:
sudo apt install fortune
On rpm-based distros:
sudo yum install fortune
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:
kgiii@kgiii-lmde:~$ fortune -l
The Least Perceptive Literary Critic
The most important critic in our field of study is Lord Halifax. A
most individual judge of poetry, he once invited Alexander Pope round to
give a public reading of his latest poem.
Pope, the leading poet of his day, was greatly surprised when Lord
Halifax stopped him four or five times and said, "I beg your pardon, Mr.
Pope, but there is something in that passage that does not quite please me."
Pope was rendered speechless, as this fine critic suggested sizeable
and unwise emendations to his latest masterpiece. "Be so good as to mark
the place and consider at your leisure. I'm sure you can give it a better
After the reading, a good friend of Lord Halifax, a certain Dr.
Garth, took the stunned Pope to one side. "There is no need to touch the
lines," he said. "All you need do is leave them just as they are, call on
Lord Halifax two or three months hence, thank him for his kind observation
on those passages, and then read them to him as altered. I have known him
much longer than you have, and will be answerable for the event."
Pope took his advice, called on Lord Halifax and read the poem
exactly as it was before. His unique critical faculties had lost none of
their edge. "Ay", he commented, "now they are perfectly right. Nothing can
-- Stephen Pile, "The Book of Heroic Failures"
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.
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.