Skip to main content

Play Tetris and text-based games hidden in your Mac’s Terminal

terminal-doctor_dt
Image used with permission by copyright holder

Has modern gaming got you down? Do you long for the days of Oregon Trail? Is Tetris the pinnacle of gaming for you? If so, MacLife uncovered a few games buried in your Mac’s Terminal shell using a program called emacs (not to be confused with the Apple eMac). While Terminal may look like the equivalent of the business-front to the party-back of OS X’s graphical interface, it’s useful for programming and digging deeper into the UNIX base that OS X is built upon. Plus, there are a few treats buried within it.

While Call of Duty isn’t secretly buried within your Mac, there are at least four different games built into emacs that are accessed via the Terminal, including a very basic version of Tetris, a text-based adventure game, and even a “psychotherapist” who reads like a joke psychoanalyst crossed with the attitude of Siri. There’s also a program that generates random patterns made out of “@” signs that’s oddly hypnotic to watch.

So how do you access these slightly hidden games? First, open the Terminal either from the Applications folder or by searching for it. At the command prompt type “emacs,” then hit the enter key. Next, press the ESC key and then the letter “x.” For Tetris, type in “tetris” and hit enter. For the psychotherapist, type “doctor,” and for the random “@” patterns, type “life.” Hit enter after each command. If you’re unable to input a command, press the ESC key and “x” again. 

Accessing the text adventure takes a little more work. At the command prompt when you first open Terminal, type “emacs -batch -l dunnet” and press enter. Navigate around the game by entering commands such as “Take shovel” or “Go southeast.” Typing “help” will give you a full list of commands as well as tips for playing the game. Have fun! 

Editors' Recommendations

Topics
Meghan McDonough
Former Digital Trends Contributor
Meghan J. McDonough is a Chicago-based purveyor of consumer technology and music. She previously wrote for LAPTOP Magazine…
How to change your Mac’s screen resolution in macOS Ventura
The MacBook Pro open on a wooden table.

You'd think that changing the screen resolution with macOS Ventura would be an easy task, but Apple made it a bit more complicated than expected. The main reason for this is that your options change based on whether you're connected to an external monitor – and there's also a menu you might have to deal with, one that's a bit off the beaten path and not readily available to all users.

Read more
How to play Fortnite on a Mac: all methods, explained
epic games needs to address fortntte crunch fortnite on mac 7616

It’s no secret that Apple and Epic Games don’t exactly see eye to eye, with the two companies frequently at loggerheads over Apple’s App Store practices and commissions.

The fallout from that dispute has made it much more difficult to play Fortnite on a Mac than it used to be, as Epic has placed numerous restrictions on gamers running Apple’s hardware.

Read more
The one problem with Mac gaming no one is talking about
Halo running on a MacBook Pro.

For the first time in years, I’m genuinely excited about the Mac’s gaming prospects. This year looks set to be a great one for Mac gamers, with hardware and software finally aligning to bring a bounty of great games and blistering performance in every area.

Well, almost every area. You see, there’s still one thing that is holding gaming back on the Mac. No, it’s not the range of games or the performance of Apple’s computers -- it’s the Magic Mouse.
A gaming hindrance

Read more