Linux Tactic

Get Moooving with Cowsay: A Fun and Practical Linux Command

The cowsay Linux command may sound like a strange topic for a computer program, but it’s actually a fun and entertaining command that has practical uses. In this article, we’ll explore the world of cowsay and walk you through everything you need to know to use it effectively.

Overview of cowsay command

Cowsay is a configurable talking cow that prints ASCII art of a cow with a speech bubble, displaying any message you want. The cow character was first created by Tony Monroe in 1999 and has since gained a cult following.

It’s a fun and novel way to communicate messages to other people using the command line.

Examples of cowsay

Let’s take a closer look at some examples of cowsay. The simplest way to use cowsay is to type the command followed by your message, like this:

“`

$ cowsay “Hello world!”

_____

< Hello world! >

——-

^__^

(oo)_______

(__) )/

||–WWW |

|| ||

“`

You can also specify different cow characters to use by using the -f option, followed by the name of the cow, like this:

“`

$ cowsay -f moose “Hello world!”

____

/ Hello

world /

——

/___/

( o o )

_=_/ ___________

/

_ / _

/ ) ( |

/ / / _

/ / __ |

( / ) )) |

_/ __/ /

“`

There are many different cow characters you can choose from, including a sheep, a dragon, and even a unicorn.

Installation and usage of cowsay

To install cowsay on your Linux machine, you can use your package manager. For example, if you’re using Ubuntu, you can run the following command:

“`

$ sudo apt-get install cowsay

“`

Once you have cowsay installed, you can start using it to display messages.

Here are a few examples of how to use cowsay with different options and flags:

“`

$ cowsay -e @@ “I’m watching you”

_______

< I'm watching you >

——-

o

o

_

// \//

\_/_/_)_

| |

| + + |

| |

_____/

“`

In this example, we used the -e option to specify the eye character as “@@”, giving our cow a creepy look. You can also change the type of animal used by cowsay using the -T flag, like this:

“`

$ cowsay -T U “Hello there!”

____

< HELLO THERE! >

—-

____________

| |

| |

/

/ _

/

/ /| | |

/ / | _____| |

| | —-/ /

| | | | | |

_ | |___|_|

(oo)____|* (oo)p

“`

Here, we used the -T flag followed by “U” to use a unicorn as our character, instead of the default cow.

Options and settings

There are many different options and flags you can use with cowsay to customize your message. Here are a few of the most useful ones:

– -e: Specifies the eye character to use, such as -e @@ to make the eyes look creepy.

– -b: Adds a bubble to the message for better readability. – -f: Specifies the animal to use, such as -f tux to use a penguin.

– -r: Makes the animal face the opposite direction. – -T: Specifies the type of animal to use, such as -T U for a unicorn.

– -W: Specifies the width of the speech bubble.

Conclusion

In conclusion, cowsay is a quirky and fun Linux command that is surprisingly useful in certain situations. With its ability to display messages using ASCII art cows, it’s an excellent way to brighten up someone’s day or convey a message with a touch of humor.

Whether you’re a seasoned Linux user or a beginner, cowsay is a command worth exploring and adding to your toolkit.

3) Listing available art types

If you’re getting bored with the default cow character in cowsay, there are plenty of other art types available to choose from. To view the full list of available art types, you can use the -l option, like this:

“`

$ cowsay -l

cow

dragon-and-cow

koala

moose

ren

sheep

skeleton

stegosaurus

turtle

tux

unipony

www

“`

This will display a list of all the available art types, along with their names. To use a specific art type, you can use the -f option, followed by the name of the art type, like this:

“`

$ cowsay -f turkey “Happy Thanksgiving!”

____

/

| Happy|

|Thanksg|

|iving!|

____/

v

V

“`

In this example, we used the -f option followed by “turkey” to use a turkey character instead of the default cow.

4) Different cowsay mind states

In addition to using different art types, cowsay also has several different “mind states” that you can use to customize the behavior of the cow. Here’s an overview of the different mind states available:

– Normal: This is the default state of the cow and doesn’t require any extra options.

– Paranoid: Use the -p option to put the cow in paranoia mode, where it thinks everything is out to get it. “`

$ cowsay -p “They’re watching us!”

__

UooU.’@@@@@@`.

__/(@@@@@@@@@)

(@@@@@@@@)

`YY~~~~YY’

|| ||

“`

– Dead: Use the -d option to put the cow in a dead state, with Xs for eyes and an open mouth. “`

$ cowsay -d “This is a dead cow.”

_______

< This is a dead cow.

>

——-

^__^

(xx)_______

(__) )/

U ||—-w |

|| ||

“`

– Borg: Use the -b option to put the cow in Borg mode, complete with a snazzy eyepiece. “`

$ cowsay -b “We are the Borg.”

____

/ We

are /

—-

,,,

/–|||

// ||||

// |||

// ||||

//__| _)-|

Cowsay 00–

“`

– Wired: Use the -w option to put the cow in a wired state, with bulging eyes.

“`

$ cowsay -w “Too much coffee!”

______

/ Too

| much |

|coffee!|

——-

^__^

(@@)_______

(__) )/

||–WWW |

|| ||

“`

– Youthful: Use the -y option to put the cow in a youthful state, complete with a baseball cap. “`

$ cowsay -y “Yo, what’s up?”

___

/

| Yo, |

|what’s|

| up?

|

——

/_

.–. `–`/

/ /`-._/

/ /_|_

((-‘ ‘`-‘

“`

– Tired: Use the -t option to put the cow in a tired state, complete with half-closed eyes. “`

$ cowsay -t “I need a nap.”

____

/ I

| need|

|a nap|

| |

——

__ _/_/

__/

~~~~~~~~~~~~~~~~~

/

/ /

/ /

“`

– Greedy: Use the -g option to put the cow in a greedy state, complete with dollar signs in its eyes.

“`

$ cowsay -g “Show me the money!”

_____

/ Show

| me |

| the |

| money! |

——-

$$$$$$ $$$$$$ $$ $$

____$$ $$ __$$ $$$ $$ |

| $$$$$$$ | $$$$$$$$ |$$$$$$ |

/ $$ __$$ | $$ ____|$$$$$$ |

__/ $$ / $$ | $$ | $$ $$$$ |

/ | $$ | $$ | $$ | $$ |$$$ |

| | $$$$$$ | $$ | $$$$$$ /

____| ______/ __| ______/

“`

– Stoned: Use the -s option to put the cow in a stoned state, complete with bloodshot eyes. “`

$ cowsay -s “Dude, what if the universe is just, like, a giant simulation, man?”

_____

/

| Dude, |

| what if the |

| universe is just, like, a |

| giant simulation, man?

|

————-

^__^

_______/(oo)

//( /(__)

| W—-|| |~|

|| || |~| ~~

” ”

5) Combining cowsay with fortune

While cowsay is already a fun and entertaining tool, you can take things to the next level by combining it with the fortune utility. Fortune is a command-line utility that prints out random, often humorous quotes to the console.

By using the output of fortune as the input to cowsay, you can create funny and entertaining messages in no time.to fortune utility

To use fortune, you’ll first need to install it on your system. Depending on your operating system, you can install it using the package manager.

Once installed, you can run the command like this:

“`

$ fortune

“You’ll never find peace of mind until you listen to your heart.” — George Michael

“`

This will output a random quote from the fortune database. To use this output with cowsay, we’ll need to pipe the output into the cowsay command.

Using fortune output with cowsay

To pipe the output from fortune into cowsay, you’ll use the | character, which is known as a pipe. Pipes are used to redirect the output of one command to the input of another command.

Here’s an example of how to use fortune and cowsay together:

“`

$ fortune | cowsay

______________________________

/ The true object of all human

life is play. — G.

K. /

——————————

^__^

(oo)_______

(__) )/

||–WWW |

|| ||

“`

As you can see, the output from fortune was used as the message for cowsay, creating a fun and playful quote.

You can use different art types with cowsay to add even more personality to the message.

Combining cowsay with fortune using different art types

By combining cowsay with fortune and different art types, you can create endless entertaining messages. For example, you can use the following command to get a quote about love, with a heart-shaped cow:

“`

$ fortune | cowsay -f love

______________

/ Courage is not

the absence of fear;

——————

__…_ __

.-“” `””-` “-.

_.-‘ `-._

.’ `. .’ `.

: ;

; ;

; ;

; ;

; ;

; ;

; ;

; ;

____:`._ _.:`.___

,’`._ “–..__ __..–“ _.“,

/ ..`–._ “””–. .–“”“ _.–`..

| /__…_/ .-.-. (__) ,-.

.-.^-..__..__ |

|’… ._O,….`–.___ ___..–`….,O_.-‘ _ .

. ….`|

|O…–”’_.–=_/ _=-.–._“`–…O|

|`”’-._ `-._ _.-‘ _.–”`|

| `-._ `-._ _.-‘ _.-‘ |

-_ `._ `-._ _.-‘ _.–‘ _.- /

`.

`-_ `._ `-._ __.-‘ _.–‘ _.-‘ ,’ ,’

`. `-_ `._ `-._ __..–‘ _.–‘ _.-‘ _.–‘ ,’`

`.

`-_ `._ `._`-._,’_______,-‘ _.-‘ _.-‘_.-‘ ,’`

`-_ `-.___ `-_“-..__ __..–” __.–”__..–” _.-‘

`–..__ `-._`-.__”—” __..–”__..–”_.–‘`

`-.__“-..__ __..–”__..–”_.-‘`

“—//\//-”“

“““`

Or, you can use the following command to get a quote about science, with a frog character:

“`

$ fortune | cowsay -f frog

_____

/ The universe is not |

| required to be in

perfect harmony with human ambition. |

—————————————

,+

,+””`-._

[~~~—___…—“”” `.

/ ,_ `. ,+””___ ,_++`.

,-=“ “”~-._ /v^/` `*. .’

>|<___.|_|_|_/,----`-' /~W```--.+=;:

`”” DIKW /;|

/; :z

/;//|

/;/;

/;/;

|___|

`7\

In conclusion, the cowsay Linux command is not only a quirky and entertaining feature, but it also offers practical functionalities for communicating messages through the command line.

By exploring different art types, mind states, and combining cowsay with the fortune utility, users can create personalized and humorous messages. The ability to customize the appearance of the cow, paired with the random and amusing quotes from the fortune database, makes for endless possibilities.

Whether you’re looking to brighten someone’s day, add a touch of humor, or simply have fun, cowsay is a versatile tool to incorporate in your Linux command line toolkit. So, get creative, unleash your imagination, and enjoy the delightful world of cowsay!

Popular Posts