Lesson 105: cowsay Command
In this lesson, you'll learn how to use the cowsay command to generate fun ASCII art of a cow or other animals with customizable speech bubbles in Linux.
Let's discuss another fun command for Linux called the cowsay command. As its name suggests, this command is used to generate an ASCII art representation of a cow or other animals with speech or thought bubbles containing a customizable message.
Install cowsay in Linux
To install this command on your system, execute one of the commands mentioned below based on your system's package manager.
$ sudo apt install cowsay # Debian, Ubuntu and Mint
$ sudo yum install cowsay # RHEL/CentOS/Fedora and Rocky/AlmaLinux
$ sudo emerge -a sys-apps/cowsay # Gentoo Linux
$ sudo apk add cowsay # Alpine Linux
$ sudo pacman -S cowsay # Arch Linux
$ sudo zypper install cowsay # OpenSUSE
cowsay Command Syntax
$ cowsay [OPTIONS] [MESSAGE]
cowsay Command Options
| Option | Description |
|---|---|
-f FILE |
Use a specific animal or character file |
-l |
List all available cowfiles (animals/characters) |
-e EYE |
Set custom eyes for the cow (e.g. xx for dead eyes) |
-T TONGUE |
Set a custom tongue for the cow |
-W WIDTH |
Set the column width of the speech bubble |
-b |
Borg mode (== eyes) |
-d |
Dead mode (XX eyes) |
-g |
Greedy mode ($$ eyes) |
-p |
Paranoid mode (@@ eyes) |
-s |
Stoned mode (** eyes) |
-t |
Tired mode (-- eyes) |
-w |
Wired mode (OO eyes) |
-y |
Young mode (. eyes) |
1. Generate ASCII Art with a Custom Message
After installation, you can try running the cowsay command by simply typing: