Display a fortune message when you log in

This post is kinda notes to me.  The link which i had bookmarked for this has been gone…  So i am writing here whatever i can remember of what did.

This is to display a random text whenever you log in to the terminal.  or open a terminal window in GUI.

For this to work you need to have fortune installed.  Install it from you Distibutions repositories…  Then become root and open /etc/bashrc in any editor.  Add the following lines at the end of the file.

#Display a fortune message when terminal (shell) starts
echo “Welcome $(whoami)”
echo “——”
echo “——“

Now save the file and quit terminal and restart.   Now whenever you start / log into a terninal,  you will get some random funny messages welcoming you……

I first saw this in this site…

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s