Written by Topher Kessler
The OS X terminal has a variety of fun UNIX commands and resources that have been programmed in over the years. These include small databases of information and games, among other random additions; so if you're interested in looking up music history milestones, the meaning of various types of flowers, want to fire up old-school pong or tetris, or even see a full episode of Star Wars, forget about the internet and look no further than the OS X terminal.
Open the terminal and type the following commands to get information on flowers and their meanings:
Enter this command to see what precious stones and flowers are associated with a given birth month:
This one will show a list of proper names based on any partial name used in the text in "INPUT"
These commands will list milestones in music, famous birthdays, history, or computer development:
To put these to fun use, you can add them to your terminal's profile in order to have the computer automatically output the information pertaining to the current date whenever you launch the terminal. To do this, follow this procedure:
- Enter "pico ~/.bash_profile" in the terminal to open a simple text editor.
Copy and paste the following into the terminal window:
grep $today /usr/share/calendar/calendar.music
grep $today /usr/share/calendar/calendar.history
grep $today /usr/share/calendar/calendar.computer
grep $today /usr/share/calendar/calendar.birthday
- Press control-o followed by "y" to confirm saving of the buffer.
- Press control-x to quit the text editor.
- Open a new Terminal window and if anything happened on the current date, it will display along with the login information.
In UNIX and Linux systems, the program "Emacs" is a complex text editor that has become popular among programmers, and through its development many people have contributed fun scripts to run with the program. These include small text animations, question and answer activities, and games. OS X comes with a full BSD subsystem that contains a full set of UNIX tools, including emacs, and therefore Mac users have access to these scripts that have been programmed for Emacs over the years.
To access them, open the Terminal and type "emacs" to launch the editor. Then press the escape key followed by the "x" key to go to the prompt for loading scripts. At this point you can enter any one of the following scripts to run. To quit emacs, press control-x followed by control-c, or just close the terminal window and confirm that you are quitting. This second option will force emacs to quit, but will not hurt anything.
5x5 -- change all the areas on the board to hash marks in the least number of moves
blackbox -- find four hidden balls in the box
decipher -- figure out the hidden message
dunnet -- small RPG game
gomoku -- create a row of 5
hanoi -- move disks around
mpuz -- figure out which numbers are being multiplied together
pong -- the classic pong game
snake -- wind your way through a maze and obstacles
solitaire -- remove as many pebbles from the board as possible
tetris -- the classic tetris game
animate -- animates text in fun phrases
dissociate -- mix up the current text
doctor -- diagnose any problem
landmark -- a neural-network robot
life -- pattern generator based on the "game of life" algorithm
morse -- convert the text to morse code
spook -- output random spy terms
yow -- returns the same line every time, used to output more.
zone -- text in the emacs buffer will slowly disintegrate and fall downwards
Type "banner" in the terminal followed by a string of characters to output that string in large ASCII text, for instance:
You can also use redirection to output the banner to a text file that you can open and print.
This file will be in your home folder.
If you would like to see a nearly full version of Star Wars Episode IV in ASCII characters, enter the following in the terminal:
Make your Mac sing or speak
This one isn't a new feature to OS X, but coupling a few sounds with the singing "Cello" text-to-speech voice will give you a nice tune. Enter the following command in the terminal to make the computer sing:
For extra fun, you can make a remote mac sing this tune by logging in with SSH and running this command. You can also use this with other voices as well besides "Cello", and prank a friend by having the computer say something while they're working. Some alternative voices are: Alex, Bruce, Fred, and Junior, though any of the System Voices in the "Text to Speech" system preferences will do."...I'm watching you, Dave."
Unix has been around for decades, which has been plenty of time for geeks and programmers to make their mark and contribute a fun game of sorts. They are hidden all over the place, so if you know of others please let us know by posting it in the comments section below.
Topher has been an avid Mac user for the past 10-15 years, and has been a contributing author to MacFixIt for just over a year now. One of his diehard passions has been troubleshooting Mac problems and making the best use of Macs and Apple hardware both for family and friends, as well as in the workplace. He and the newly formed MacFixIt team are hoping to bring enhanced and more personable content to our readers, and keep the MacFixIt community going here at CNET. If you have questions or comments for Topher or the other MacFixIt editors, feel free to contact us at http://www.macfixit.com/contactResources