Linux Command-line Easter Eggs

This topic was published by and viewed 1616 times since "". The last page revision was "".

Viewing 1 post (of 1 total)
  • Author

  • DevynCJohnson
    • Topics - 437
    • @devyncjohnson

    In the Linux world, there are many programmers with a sense of humor or that have some entertaining ideas. Many users would be amazed with these cool commands and hidden features found in some programs and commands.

    Cowsay is a command that displays text in an artistic way. Instead of printing text to the screen, users can pipe the output of commands to cowsay. The command will display a cow with a speech bubble containing the given text. For instance, to view the file /etc/os-release, users could type "cat /etc/os-release | cowsay". Cowsay accepts parameters that change the output.

    • -b - "Borg mode" uses "==" in place of "oo" for the cow′s eyes
    • -d - "Dead" uses "XX" plus a descending "U" to represent an extruded tongue
    • -g - "Greedy" uses "$$"
    • -p - "Paranoid" uses "@@"
    • -s - "Stoned" uses "**" to represent bloodshot eyes, plus a descending "U" to represent an extruded tongue
    • -t - "Tired" uses "--"
    • -w - "Wired" uses "OO"
    • -y - "Youthful" uses ".." to represent smaller eyes
    • -e - (eye_string) Manually specifies the cow′s eye-type. For example, "cowsay -e ^^" will make a cow with "^^" eyes.
    • -T - (tongue_string) Manually specifies the cow′s tongue shape. For instance, "cowsay -T \(\)" will make the tongue out of two parentheses.
    • -f cowfile - Specifies a ".cow" file containing alternative ASCII art. This parameter accepts both absolute file-paths and those relative to the environment variable COWPATH.
    • -l - Lists the names of available cow-files in the COWPATH directory instead of displaying a quote.

    With these parameters, Linux users can make some interesting displays. For example, "cat /etc/os-release | cowsay -f tux" will replace the cow with Tux the Linux penguin. Users can make their own cow files and use them by specifying the name with the "-f" parameter.

    Cowthink is the same as cowsay except cowthink uses a thought bubble instead of a speech bubble.

    These two commands can be used to make scripts more interesting. For illustration, a developer makes a script that prints a warning on the user's screen when their hard-drive is almost full. The developer could make the script echo a single, plain line. Alternatively, the developer could make the script print the warning using cowsay. Now, the user will see a cow issuing the warning.

    For those who do not use the command-line, xcowsay can be used instead. This us a graphical cow that appears on the desktop above all of the active windows. To display a cow for five seconds that says "Aloha", type the command below. (To install xcowsay, type "sudo apt-get install xcowsay".)

    xcowsay -t 5 "Aloha"

    If a programmer has some time to make an interesting script, they could make a script that pipes a string like "Welcome back $USER" to xcowsay when the monitor turns on or the system boots up. Then, a cow will greet the user.

    The terminal can also print some interesting quotes and jokes. Type "fortune" to see what random quote or joke you get. Sometimes, the command will print sayings one would see in a fortune cookie like "Today is the tomorrow you worried about yesterday.".

    Often times, Linux users will use the fortune command with cowsay, cowthink, or xcowsay. They can be put together like this - "fortune | cowthink".

    Many users know that the Linux terminal only displays text, so they know movies cannot be viewed in a command-line. Well actually, they think wrong. To watch Star Wars in ASCII mode, type "telnet". The command accesses the web link which sends a converted Star Wars Episode IV ASCII video.

    In computers, users may find what are called Easter Eggs. These are hidden features that are usually for entertainment. For instance, typing "aptitude moo" will give "There are no Easter Eggs in this program." as the output.

    The next command, "apt-get moo" prints ASCII art of a cow that says "Have you mooed today?".

    On systems using GNOME, press alt+F2 and type "gegls from outer space" to play this hidden game. Most computer Easter eggs are like this; they are purely for fun and entertainment. When these same actions are performed on a system running Unity, Unity says that there are no Easter eggs yet.

    In Firefox, type "about:robots" in the address bar. This is a humorous Easter egg that the Mozilla developers have made about robots. Also see "about:mozilla" for another odd Easter egg.

    Aptitude has mimicked apt-get's moo Easter egg.

    collier@Nacho-Laptop:/usr/bin$ aptitude moo
    There are no Easter Eggs in this program.
    collier@Nacho-Laptop:/usr/bin$ aptitude -v moo
    There really are no Easter Eggs in this program.
    collier@Nacho-Laptop:/usr/bin$ aptitude -v -v moo
    Didn't I already tell you that there are no Easter Eggs in this program?
    collier@Nacho-Laptop:/usr/bin$ aptitude -v -v -v moo
    Stop it!
    collier@Nacho-Laptop:/usr/bin$ aptitude -v -v -v -v moo
    Okay, okay, if I give you an Easter Egg, will you go away?
    collier@Nacho-Laptop:/usr/bin$ aptitude -v -v -v -v -v moo
    All right, you win.
    -------/ \
    / \
    / |
    -----------------/ --------\
    collier@Nacho-Laptop:/usr/bin$ aptitude -v -v -v -v -v -v moo
    What is it? It's an elephant being eaten by a snake, of course.

    NOTE: The parameter can also be typed in this fashion "-vvv".

    Type the command "ddate" to see the significance of today. This command is more interesting when combined with cowsay or xcowsay.

    Many users accidentally type "sl" instead of ls. This caused a clever developer named Toyoda Masashi to make a command called "sl". This command makes a steam locomotive in the form of ASCII art, drive by on the screen. Install sl by typing "sudo add-apt install sl". Once complete, type "sl". Now when users type "sl" rather than "ls", they will be very confused, especially if they are very sure they typed "ls".

    Typing the following command will provide users with important "Lord of the Ring" dates.

    calendar -f /usr/share/calendar/calendar.lotr -A 365

    There are several other calendar Easter eggs.

    calendar -f /usr/share/calendar/calendar.pagan -A 365
    calendar -f /usr/share/calendar/ -A 365
    calendar -f /usr/share/calendar/ -A 365
    calendar -f /usr/share/calendar/calendar.history -A 365

    These are just some of the many hidden and entertaining features of Linux.

Viewing 1 post (of 1 total)