Sat. Nov 23rd, 2024
"You are WRONG, you ol' brass-breasted fascist poop!"
-- Bloom County (fortune)

fortune is a little program that I install on just about every single Unix/Linux box I administrate. It’s not a tool, it’s not a game and it’s not a backdoor or any other program or subsystem to make your life easier or make the system a breeze to operate. The fortune goody or program has been around almost as long as Unix itself. Even back in the late 1960’s programmers knew how to waste time and and have fun and even though their programming jobs might not be what exactly they describe as ‘fun’, the fortune program was created by some intrepid programmer to shed a little sunshine anywhere a Bourne, Korn or C Shell or any shell for that matter could be found. Quick aside for those running into this article wondering what it’s all about and more specifically what this talk of ‘shell’ is all about. In the vernacular of digital enthusiasts the ‘shell’ is a little program that runs on a computer that allows you to interact with the computers hardware and software. It’s the command line interface that allows you to give the computer commands or input, the computer then processes that input, and the shell will coordinate or output your program to a display device, or monitor. So to sum up, fortune is a small text based computer program that displays something on the screen when its executed or run.

Fights between cats and dogs are prohibited by statute in Barber, North
Carolina.     (fortune)

So what is fortune all about? fortune is a simple a program that when run will spit out a line of text, a poem, or maybe a conversation or some other type of anecdote. It frequently spits out quotes by famous people like presidents, authors or other well known figures. Sometimes you’ll get 2 or three stanzas of a poem and at others you’ll get the refrain of a famous tune. There’s a ton of Dave Berry quotes (he’s a popular author of quotes and one liners who you may be familiar with) as well as Murphy’s Laws, tales and other yarns to name but a few.

Lessness:
A philosophy whereby one reconciles oneself with diminishing
expectations of material wealth: "I've given up wanting to make a
killing or be a bigshot. I just want to find happiness and maybe open
up a little roadside cafe in Idaho."
-- Douglas Coupland, "Generation X: Tales for an Accelerated
Cultured"     (fortune)

If you haven’t figured it out by now the 3 greyed sections of text above are three random fortunes I got from 3 shell sessions I have going to Ubuntu boxes I am working on while concurrently writing this article. Installing fortune in Ubuntu is a breeze:

apt install fortune fortunes

After it’s installed, I usually put it at the end of my .profile file (or .bash_profile et al) so that every time I log in to a system I get a ‘fortune‘. fortune of course is the main program and fortunes is an expanded collection of quotes. There’s enough there for lifetimes of quotes. You could also put it at the end of /etc/profile then everyone who logs in via ssh or other shell login will get a fortune. Most programs run at the command line in a shell are high powered utilities which ultimately could wreak havoc on a system if abused or even mistyped. It’s nice to know there are still some utilities and programs that are around to give us a break from this terminal world of necessary commands. Sometimes we just want to open a fortune cookie and dream, and fortune allows you to do that virtually. Now get back to work. If you like fortune, cowsay and lolcat are two more funny little shell based text programs you might find interesting; I’ll leave it to you to discover but both can be apt get’ted.

Please visit my Patreon page if you’re so inclined or make a donation. Or you can click the coffee cup in the bottom right corner of the screen and Buy Me A Coffee. Thank you!

By editor

Leave a Reply