How To Play Two Video Game Classics In Terminal [OS X Tips]



And here you thought Terminal was just for Unix geeks.

Ok, well, maybe it really is, but there’s a fun easter egg or two hidden in the old UNIX code that underlies Apple’s OS X software.

Turns out that you can play Tetris and Snake, two classic games from the dawn of digital gaming, in a Terminal window. Intrigued? It’s super easy.


First of all, you’ll need to launch your Terminal app from the Applications/Utilities folder, the Dock, or an application launcher like Alfred.

Next, type in the word emacs and then hit Return.

You’ll get a lovely screen full of info about emacs, a text editor used in UNIX and the Terminal, which starts out with a friendly, “Welcome to GNU Emacs, a part of the GNU operating system.” Yay!

Now, hit the Esc key on your keyboard, and then the letter X. You’ll get yourself an interesting buffer window which is typically used to save notes about the file you’re working on, or to evaluate Lisp code. Don’t ask.

esc x

Next, type in the word tetris. Boom–you’ll get a game of Tetris with the familiar Tetromino shapes. Move the shapes left and right with the horizontal arrow keys, and rotate with the up and down arrow keys. You can’t make them slam to the bottom of the screen, but hey, you’re playing Tetris in the Terminal. Relax.

To play Snake, then, all you need to do is the same thing–launch emacs, type Esc-X, and then type the word snake. Move your snake with the directional arrow keys and try not to hit anything or eat your own tail.


To quit your intense gaming session, either hit Control-Z on your keyboard, close the Terminal window, or quit Terminal altogether. You’ll need to confirm your choice, and then you’ll be done.

Via: Business Insider


Daily round-ups or a weekly refresher, straight from Cult of Mac to your inbox.

  • The Weekender

    The week's best Apple news, reviews and how-tos from Cult of Mac, every Saturday morning. Our readers say: "Thank you guys for always posting cool stuff" -- Vaughn Nevins. "Very informative" -- Kenly Xavier.