$linuxjunkies
>

cowsay(1)

Display a message spoken by an ASCII art cow (or other animal).

UbuntuDebianFedoraArch

Synopsis

cowsay [OPTION]... [MESSAGE]

Description

cowsay reads a message from standard input or command-line arguments and displays it in a speech bubble spoken by an ASCII art cow. It's primarily used for entertainment and adding personality to shell scripts, login messages, and command output.

The cow's appearance can be customized using different cowfile templates (cows, dragons, sheep, etc.), and various options control the expression and behavior of the character.

Common options

FlagWhat it does
-f cowfileSpecify a cowfile (template) to use; e.g., dragon, turtle, sheep
-lList all available cowfiles installed on the system
-e eyesSet the eye characters; default is 'oo', use 'XX' for dead, '**' for stars
-T tongueSet the tongue characters; e.g., '-T U' for a tongue sticking out
-W widthWrap message text at specified column width
-nSuppress the default word wrapping and preserve line breaks
-bMake the cow look borg-like (heavy, metallic)
-dMake the cow look dead or asleep (uses dead eyes and droopy tongue)
-gMake the cow look greedy (wide eyes and lolling tongue)
-pMake the cow look paranoid (eyes looking in different directions)
-sMake the cow look stoned or sleepy (squinting eyes and tongue)
-tMake the cow look tired (eyes closed or nearly closed)

Examples

Display a simple message in a speech bubble from a cow

cowsay 'Hello, World!'

Pipe text to cowsay via standard input

echo 'Have a nice day!' | cowsay

Use the dragon cowfile instead of the default cow

cowsay -f dragon 'I am a dragon!'

List all available cowfiles (dragons, sheep, tux penguin, etc.)

cowsay -l

Make the cow look dead with 'XX' eyes and drooping tongue

cowsay -d 'I am dead'

Customize eyes to stars and add a protruding tongue

cowsay -e '**' -T 'U' 'Woozy!'

Display a random fortune in a cow's speech bubble, wrapped at 50 chars

fortune | cowsay -W 50

Use turtle cowfile and pipe to lolcat for rainbow coloring

cowsay -f turtle 'slow and steady' | lolcat

Related commands