- Enabling Emacs |
- Tetris |
- Snake |
- Gomoku |
- Pong |
- Doctor |
- More Games |
- Video |
- Tips |
- Warnings
This article was co-authored by wikiHow staff writer, Megaera Lorenz, PhD. Megaera Lorenz is an Egyptologist and Writer with over 20 years of experience in public education. In 2017, she graduated with her PhD in Egyptology from The University of Chicago, where she served for several years as a content advisor and program facilitator for the Oriental Institute Museum’s Public Education office. She has also developed and taught Egyptology courses at The University of Chicago and Loyola University Chicago.
This article has been fact-checked, ensuring the accuracy of any cited facts and confirming the authority of its sources.
This article has been viewed 149,909 times.
Learn more...
The Terminal is an application inside all Macs that lets you access your computer’s command-line interface. It might be intimidating at first, because it's not as intuitive as the usual user interface, but it offers a lot of neat features, and you can use it do a lot of things that you would otherwise do manually on your system. This article will show you how to play old-school games in the Terminal. If you’re using a current version of macOS, you’ll probably need to install Emacs first.
Steps
Enabling Emacs
-
Install Homebrew. Unless you’re using an old version of macOS, you probably don’t have Emacs installed on your computer. This is an application you’ll need to play old-school games in Terminal. In order to get Emacs, first you need to install Homebrew, a package manager that allows you to make special modifications to your Mac.[1] To install it:
- First, install Apple’s Command Line toolkit if you haven’t already done so. In Terminal, enter the command xcode-select --install and press Return.
- If a window pops up asking if you want to install the Command Line, click Install. Follow the prompts to finish the installation process.
- You’ll see an error message if you’ve already installed the Command Line toolkit in the past.
- If you’re using macOS Catalina or later, switch to the bash shell before you continue. To do this, enter chsh -s /bin/bash, type in your Mac’s administrator password, and then restart Terminal.
- Enter the following command and then press Return: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- When prompted, enter your administrator password and press Return, then press Return again. Wait for the installation to complete.
Advertisement - First, install Apple’s Command Line toolkit if you haven’t already done so. In Terminal, enter the command xcode-select --install and press Return.
-
Enter the command brew install --cask emacs. This will install Emacs on your Mac. This process may take several minutes.[2]
- If you have an older Mac and you suspect you might have an outdated version of Emacs installed, run the following commands first to uninstall it:[3]
- sudo rm /usr/bin/emacs
- sudo rm -rf /usr/share/emacs
- If you have an older Mac and you suspect you might have an outdated version of Emacs installed, run the following commands first to uninstall it:[3]
-
Type in the command emacs -q --no-splash -f (game). Replace “(game)” with the name of the game you want to play (no parentheses). A new window will pop up with your game in it![4]
- For example, if you want to play Tetris, enter the command emacs -q --no-splash -f tetris.
- Check out this list of Terminal games and commands to run them.
Tetris
-
Type the command emacs -q --no-splash -f tetris. Press Return to run the game. A window should appear, and Tetris blocks will start falling.
-
Move and rotate the blocks with the arrow keys. You can move the blocks from side to side with the left and right arrows. Rotate them with the up and down arrows. Your score should be on the right side of your playing area, together with Rows and Shapes.
- If you don't know how to play Tetris, see How to Play Tetris.
Snake
-
Type the command emacs -q --no-splash -f snake. A window will appear with a yellow “snake” made of blocks moving around inside it.
-
Control the snake's movement with the arrow keys. Try to collect the beads that appear on the screen.
- The objective of Snake is to guide your snake around the screen, collecting beads as they appear. The more you eat, the more your score rises, but the snake also gets longer.
- Hitting the side of the screen or hitting your tail will kill your snake, and you will lose.
- Other commands include n (to start a new game), p (to pause your game), and q (to end the game).
- It can be a little tricky to switch to the new window quickly enough to start playing before your snake hits a wall. You may need to press n to start a new game.
Gomoku
-
Type the command emacs -q --no-splash -f gomoku. A window should appear with a screen full of dots.
-
Type y or n. This will select who goes first (y will let the computer start, n will let you start).
-
Move your selector around with the arrow keys and select with x. Try to make horizontal, vertical, or diagonal row of 5 X’s or O’s before the computer does.
- Gomoku is like Connect 4, only you need 5 in a row to win.
Pong
-
Type the command emacs -q --no-splash -f pong. A window should appear with two yellow paddles on each side and a red ball bouncing around.
-
Move the paddles with the arrows and number keys. Move the paddle on the left with the left and right arrows or the 4 and 6 keys, and the one on the right with the up and down arrows. The score is under the playing screen.
- You might need to maximize the window to see both paddles.
- The objective of pong is to send the ball into the opponent's area. The only defense they have is the paddle, which is used to re-send the ball to you.
Doctor
-
Enter the command emacs -q --no-splash -f doctor. Some text should appear saying "I am the psychotherapist. Please, describe your problems. Each time you are finished talking, type RET twice." You are now conversing with your Mac's inner doctor!
-
Type out whatever you want to share with the doctor. Have fun with it, but beware––it will eventually get annoying.
- This is a version of Eliza, one of the earliest chatbots. You can play with a version of the original Eliza here.
Expert Q&A
Video
Tips
-
There are more games in more updated versions of the Mac Operating System.Thanks
-
For the games in emacs, capitalization might matter. For example, try tetris instead of Tetris.Thanks
-
To get a nicer-looking background in Terminal, select Shell > New Window > Pro. This will give you a black background. Other options will give you different colors.Thanks
Warnings
- Using the Terminal can be dangerous if you don't know what you are doing. Certain commands can destroy your whole computer or delete all your files. No commands in this article do any damage to your computer, but do be careful what you write!Thanks