Get the highlights in your inbox every week.
3 interesting ways to use the Linux cowsay command | Opensource.com
3 interesting ways to use the Linux cowsay command
Want a just-for-fun application to play with? Try cowsay.
Most of the time, a terminal is a productivity powerhouse. But there's more to the terminal than commands and configurations. Among all the outstanding open source software out there, some of it has been written just for fun. I've written about fun commands before, but this article is about just one: the venerable
Cowsay is a configurable talking (or thinking) cow. It accepts a text string and outputs a graphic of a cow talking. Here's a cow saying it loves Linux:
< I love Linux >
To get that result, all I have to type is:
$ cowsay "I love Linux"
Install cowsay on Linux
You can install cowsay with your package manager. On Debian, Mint, Elementary, and similar distributions:
$ sudo apt install cowsay
$ sudo apt install cowsay-beefymiracle
Cowsay command options
Cowsay is a simple and silly application. There's no actual use for it except to provide some diverting styling for your terminal. For instance, rather than just making a cow say a fun phrase, you can make a cow with wonky eyes say a fun phrase. Type:
$ cowsay -e @@ Hello
< Hello >
Or you can make it stick out its tongue. Type:
$ cowsay -T U Hello
< Hello >
U ||----w |
Better still, you can combine the
fortune command with
$ fortune | cowsay
Now you'll have an especially smart cow:
/ we: \
| The single most important word in the |
\ world. /
On Fedora, there's an extra option for cowsay that's also an unofficial project mascot. For years, the Fedora installer has displayed slides promoting open source contributions. Because they were styled after the interludes at drive-in movie theaters, a common cartoon character in the slides is an anthropomorphic hot dog.
In keeping with that theme, you can invoke a so-called beefy miracle with the Fedora version of cowsay:
$ cowsay -f beefymiracle Hello Fedora
You'll end up with a perfectly silly result:
< Hello Fedora >
-------------- .---. __
, \ / \ \ ||||
\\\\ |O___O | | \\||||
\ // | \_/ | | \ /
'--/----/| / | |-'
// // / -----'
// \\ / /
// // / /
// \\ / /
// // / /
/| ' / /
// ||\ /
\\_ || '---'
/' / \\_.-
/ / --| |
'-' | |
If you find yourself needing to have messages delivered to you from a graphical cow, there's the
xcowsay command. It's a graphical program similar to cowsay, and it accepts a text string that's entered by the user or piped from another application like Fortune.
Fun Linux commands
cowsay is not a useful command, it is a fun command—the equivalent of desktop widgets for your terminal. It's great for a momentary distraction and fun experiments with piping commands (try piping
ifconfig to cowsay, or
mount, or anything!). If you want to make your terminal more fun, try cowsay.