
Linux: Fun Time
The terminal does not have to be all work and no play. Here are some fun tricks and commands to break up the routine and make your command line experience a little more enjoyable. None of these are required for the course, but they are a great way to get comfortable with the terminal and discover that it has a personality of its own.
One-Liners
Do you love Linux?
Roll a dice:
Prime factors of the numbers 10, 50, and 100:
Progress bar:
Reverse the order of characters in a string:
Reverse complement a DNA sequence:
Tick .. Tick
Print the current time every 3 seconds in an infinite loop.
Count Down
A Place by the Fire
Weather Check
Info
There are several cities named Zurich worldwide, including one in Rooks County, Kansas. If you do not specify a country, you might see the weather for a different Zurich depending on your location.
Steam Engine
Everyone knows ls lists files, but have you tried sl?
What Is the Cow Saying?
cowsay generates ASCII art of a cow with your message in a speech bubble.
# Give a direct message to the cow
cowsay "Hello there!"
# Make the cow say text from a file
echo "tfjzf uif npp-nfou!" | tr 'b-x' 'a-y' > moo.txt
cowsay `cat moo.txt`
# Customise the cow
ls | cowsay -f tux # Meet your tuxedo cow
# Get a fortune from a cow
clear ; fortune | cowsay -f eyes
# See all the different cows available
for i in $(cowsay -l); do cowsay -f $i "$i"; done
Sources: cowsay on GitHub and Wikipedia