Skip to content

fortune

Start Terminal sessions with a possibly-witty quote

Really long-time Unix users—as in mainframe-based Unix—are probably familiar with fortune. This silly little program grabs a random line from a collection of files holding quotes, sayings, jokes, etc. The Unix I used many decades ago would print an entry from fortune each time you started a new session. Here are some examples of what might greet me each time…

"It's a dog-eat-dog world out there, and I'm wearing Milkbone underware."
-- Norm, from _Cheers_

Mobius strippers never show you their back side.

All constants are variables.

Years ago, I had set up my Mac's Terminal to output a fortune each time I opened a new session (window). At some point, though, I forgot to set it up on a new system, so it was gone. While fortune isn't included in macOS' Unix core by default, there are many ways to get it back, and it's relatively simple to do so. Here's one way…

[continue reading…]