Download Article
Learn the basics of playing these fun terminal games and impress your friends with your tech skills
Download Article
- Enabling Emacs |
- Tetris |
- Snake |
- Gomoku |
- Pong |
- Doctor |
- More Games |
- Video |
- Tips |
- Warnings
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
Section 1 of 7:
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] X Research source 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] X Research source
- 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]
X
Research source
- 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]
X
Research source
-
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] X Research source
- 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 .
Advertisement
Section 2 of 7:
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 .
Advertisement
Section 3 of 7:
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.
Advertisement
Section 4 of 7:
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.
Advertisement
Section 5 of 7:
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.
Advertisement
Section 6 of 7:
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 .
Advertisement
Expert Q&A
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement
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
Submit a Tip
All tip submissions are carefully reviewed before being published
Name
Please provide your name and last initial
Thanks for submitting a tip for review!
Advertisement
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
Advertisement
References
About This Article
Thanks to all authors for creating a page that has been read 146,797 times.
Advertisement