The Curious Case Of The Talking Cow
Unlike Windows or macOS, Linux is a community-based operating system. It has a lot of flavors, called “distributions” which are customized in different ways, but at its core, most Linuxes use basically the same applications, called “packages” to get stuff done. Because there’s no corporate bean counter overseeing the efficiency of the whole operation, the Linux community has been able to retain its culture beginning from the latter half of the 20th century to today. Some of that culture is contained in the inexplicably weird decisions made about packages. Cowsay is one such package.
Cowsay is a program that prints a little ASCII cow on your screen with a speech bubble stating whatever you want. It has absolutely no value other than that; it’s just one of the whimsical packages that are still included in nearly every Linux distribution in existence.
ASCII, pronounced “askee”, art has a long proud tradition on the internet and is a short form for the American Standard Code for Information Interchange. Today, we use the Unicode character set which allows graphical stuff like emojis to be displayed on our screens, and ASCII is now folded into the larger Unicode spec. But back in the days before Unicode, we had to make our own art with the extremely limiting 128 characters on our keyboard.
ASCII art of the Apple logo (https://cmp.cx/ae899)
The primary use of ASCII art was to adorn dial-up bulletin boards (BBSes) with pretty login screens and menus. Later, those screens and menus became much prettier with the advent of ANSI, (American National Standards Institute ) pronounced “ansee” art. The ANSI spec has twice as many characters as ASCII, but most of them are not visible to us. Rather, they are used to control the visible text in ways we can see, such as changing its color.
ANSI art example from the Hook-Ups BBS (https://cmp.cx/02e69)
OK, that’s enough background, let’s get back to cowsay. If you have a Linux box, type cowsay Hi! and see what happens. If nothing happens, use your package manager to install cowsay and try again.
Now let’s have some fun. Try cowsay -l (that is lower-case L) to get a list of things other than cows that can say what you want. Use the -f switch to specify a different, non-cowlike, messenger.
└──╼ $cowsay -l Cow files in /usr/share/cowsay/cows: apt bud-frogs bunny calvin cheese cock cower daemon default dragon dragon-and-cow duck elephant elephant-in-snake eyes flaming-sheep fox ghostbusters gnu hellokitty kangaroo kiss koala kosh luke-koala mech-and-cow milk moofasa moose pony pony-smaller ren sheep skeleton snowman stegosaurus stimpy suse three-eyes turkey turtle tux unipony unipony-smaller vader vader-koala www
Even if you like the cow, you can change its appearance with some simple switches:
cowsay [-e eyestring] [-f cowfile] [-h] [-l] [-n] [-T tonguestring] [-W column] [-bdgpstwy]
It’s those last options that bring about the most visible changes, but you can change the cow’s eyes and give it a tongue with the built-in switches as well. If you don’t think cows should speak, you can use cowthink instead and the speech bubble will be replaced by a thinking bubble.
└──╼ $cowsay Hi! _____ < Hi! > ——- \ ^^ \ (oo)_____ (__)\ )\/\ ||——w | || ||
└──╼ $cowthink Hi! _____ ( Hi! ) ——- o ^^ o (oo)_____ (__)\ )\/\ ||——w | || ||
Tony Monroe wrote cowsay over two decades ago and it is still a mainstay of the nerd herd. There are versions of cowsay for every operating system, libraries to include cowsay into your own application, and even web-based cows to help those of you who haven’t yet found your way to the superior *nix-based operating systems. Microsoft even sells a version of cowsay. Talk about a proprietary systems tax!
Go forth and cow, now.
my shorter content on the fediverse: https://the.mayhem.academy/@jdw