I’ve always wondered how other distros have added cool little tweaks to the terminal so that it has quotes and other cool things. Now I know some of you may already know this, but I found it rather interesting… you can add commands to the end of .bashrc in your home directory so that it shows other things before your prompt.
Here’s what my terminal now looks like:
What You’ll Need
The packages you’ll need are fortune and cowsay. Fortune basically prints out a random quote, and cowsay basically shows you the character you can see in the screenshot. The default character in cowsay is, as the name suggests, a cow… however it does come with MANY different other characters with a default install. So lets first grab these applications. Open up a terminal and type in:
sudo apt-get install fortune cowsay
Testing They’ll Work
To test these are working, try the following commands:
1 2 3 | fortune cowsay hello world fortune | cowsay -n -f tux.cow |
There are many other cow files that you can use, and you can find them in /usr/share/cowsay/cows/. If you’d like to see a list of them try this command:
ls /usr/share/cowsay/cows/
Then change the tux.cow with one of those.
Editing Your .bashrc File
To add this effect to your terminal you simply need to add it to your .bashrc file in your home directory. Type in a new terminal the following:
nano .bashrcThen simply add this at the end of the file:
fortune | cowsay -n -f tux.cow
Save the changes with CTRL+O then enter. Then close it with CTRL+X.
Or change the tux.cow with any of your choice.
Other Cool Tools
There’s another cool little tool you can use called “figlet”.
To install it we do:
sudo apt-get install figlet
To use it you basically do:
figlet "message"If you’ve like it to show up in cowsay, simply do:
figlet "message" | cowsay -n
Make sure you have the -n, otherwise it will show up wrong! If you’d like to add a different cow file simply add -f tux.cow (or any other cow file).
If you’d like to add it to your terminal, add it to the end of .bashrc as mentioned earlier. If you’d like to have both, then you can do so… just make sure you have them on separate lines.
Enjoy!
Enjoy, and hope you have fun using it. Feel free to send me a comment with cool little things you’ve done with yours, maybe even send in a screenshot to show us what you’ve done :).



