cowsay is an extremly fun and super easy to use command. Just put whatever you want as an argument after the command and you’ll be greated with an ASCII cow and a speech bubble saying it. This probably isn’t installed by default, so fire up your favorite package manager and install it!

cowsay "imma cow, moooooo~"
 ____________________
< imma cow, moooooo~ >
 --------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

This was released in 1999 by Tony Monroe, celebrating its two decade birthday just last year! He released it along with a companion command called cowthink, and yes it’s exactly what you think it is. I wont’ be covering it here, but I’m sure you can figure out how it works.

As fun as cowsay is, sometimes you really don’t want a cow. Maybe a sheep, or a koala, or a dragon. There are quite a few possiblities thats come by default. These are called cow files and and they are located at /usr/local/share/cows/. Want to see all the possible cowfiles? Here’s a quick’n’dirty way to print each one and then you can scroll with less to view them all. Just a forewarning, a few are kinda NSFW, so be careful what you decide to put in your .basrc, or .zshrc, or your ~/.config/fish/config.fish file if you’re super hip.

for cowfile in $(cowsay -l | tail -n+2); do cowsay -f $cowfile $cowfile >> my.cowsay; done
less my.cowsay

Check them out for yourself if you don’t feel like running the command above

You can also jazz up your cowsay output with the following flags:

  • -e will set the cow’s eyes to the two characters after it
  • -T will set the cow’s tongue to the following two characters. Here’s an example of what you can do!
cowsay -e @_ -T db this is the most fun I\'ve had in a long time
 _________________________________________
/ this is the most fun I've had in a long \
\ time                                    /
 -----------------------------------------
        \   ^__^
         \  (@_)\_______
            (__)\       )\/\
             db ||----w |
                ||     ||

Don’t like any of options you have available to you? One of my favorite (and now non-existant) Linux distrobutions, Crunchbang, wrote up a small cowsay hack so you can have Richard Stallman say whatever you want. I get it, he’s kindof a giant twat, and you prolly don’t want to have it on your machine. But you can make it say whatever you want! Sadly, with Crunchbang now gone, that cow file doesn’t exist anymore. But fear not, I found it, and uploaded it for you! Now thats not the only cow file you can add to your repertoire. A Github page’s pull requests has extras you can and should download. Oh, that’s not enough? Fine, here’s another repo dedicated to adding in more and more cow files. Download whichever files you like and place them in the /usr/local/share/cows folder.

Clearly, this is the greatest command that’s ever existed. Hope you have some fun with it today.

References