Oct 20, 2009

Funny login message with fortune

Fortune is a nice piece of code that prints out a random epigram. Epigrams are divided into several categories. To make it print an epigram upon logging in the console, we need to install it first:

sudo apt-get install fortune

As per step 2, we need to add this to ~/.bashrc file
if [ -x /usr/games/fortune ]; then /usr/games/fortune -s fi

Now, every time you log in to your console you will see some funny text as a welcome message generated by fortune like:
You are a very redundant person, that's what kind of person you are.

Or like this:
You will be run over by a bus.

No comments:

Post a Comment