What are games to play from a Linux terminal?

Who never procrastinated and played games instead of writing a paper, finishing a report, or looking after the kids? Absolutely no one. But when Linux users procrastinate, they procrastinate in style: while playing from the terminal! We tend to forget, but at first a graphical interface was not necessary for a good game. And thanks to open-source and the community, many arcade and other good games were ported to be played from within a terminal, without an X server running. It would be impossible to list them all, but let me present ten of these games that particularly appealed to me personally.

1.MyMan

Let's start the list with a Pac-man clone, MyMan. Pac-man is the famous arcade game from the 80's, and is still today one of my favorite games. The rules are simple: eat all the balls while avoiding the ghosts, or eat the fruits and chase down your attackers. Only the arrow keys are needed to control your character.

To install the game, you will need ncurses and groff present on your machine.

On Ubuntu or Debian:

$ sudo apt-get install libncurses5-dev groff
$ wget http://downloads.sourceforge.net/project/myman/myman-cvs/myman-cvs-2009-10-30/myman-wip-2009-10-30.tar.gz
$ tar xvfvz myman-wip-2009-10-30.tar.gz
$./configure
$ make
$ sudo make install
$ myman

On Archlinux, the game is available on AUR.

2. nInvaders

To continue with old arcade games, it would be impossible not to mention nInvaders, the clone of the famous Space invaders. Control the ship at the bottom of the screen, and defend the earth from waves of enemies. Use the arrow keys to side scroll and the space bar to shoot.

To install, just run:

$ sudo apt-get install ninvaders on Unbuntu/Debian

or install from AUR on Archlinux.

3. Moon-buggy

Finally, my last arcade favorite is moon-buggy. Inspired by Moon Patrol from 1982, the game lets you control from the side view a vehicle driving on the moon. The goal is simply to survive for the longest time possible by jumping over the holes with the space bar, or shooting with the a key. But the hit boxes are extremely punitive, and the game always oscillates close to insane frustration: a real pleasure.

Check it out with:

$ sudo apt-get install moon-buggy (on Ubuntu/Debian)

or on the AUR for Archlinux users.

4. Bastet

Let's leave the realm of the arcade for the one of really really really addictive games. What better game to start with than a Tetris clone, Bastet? No need to go over the details here: pile up the blocks with the arrow keys, rotate them with the space bar, and get as many points as you can!

To install:

$ sudo apt-get install bastet (on Ubuntu since Saucy)

or check out the AUR.

5. 2048.c

Talking about addictive games, have you heard about 2048? Because you really wanted to play it from the terminal, here is 2048.c, a version of 2048 coded in C. The goal is to obtain a block of value 2048 by fusing blocks together with the arrow keys. If you have never played it before, I will not say more as the game is intuitive and so pleasant to discover.

To install it on Ubuntu/Debian, run:

$ wget https://raw.githubusercontent.com/mevdschee/2048.c/master/2048.c
$ gcc -o 2048 2048.c
$ ./2048

For Archlinux, the AUR package arrived literally a few minutes ago since I started writing this post.

6. Greed

Maybe the hidden child of Tron and Pac-Man, Greed is an interesting game with a very colorful interface. The goal is to eat as many digits as possible using the arrow keys (hence Pac-Man), but the value that you intend to eat will also be the number of steps you will make in its direction. For example, if you are next to a "3" and press left to eat it, your character will take three steps to the left, eating every digits encountered. But the trap is that it is not possible to revisit where you already ate. In other words, the black trace is a wall (hence Tron).

sudo apt-get install greed (for Ubuntu/Debian)

and the AUR for Archlinux.

7. Ski

One of those games that require a bit of imagination, but really builds up to excitement, Ski lets you incarnate a skier trying to avoid the danger of the mountain and a hunting yeti. The controls are a bit less intuitive, and I invite you to type "?" to see the help. The idea is to move left or right or even teleport to survive.

For Ubuntu/Debian, download it here, extract the archive, and inside run:

./ski

For Archlinux, install it from AUR.

8. NetHack

Here we are, the monument of ASCII games, the foundation of a real cult, NetHack. It is not the only good roguelike game on Linux, and there are thousands of clones which are completely worth playing, but this is the one that sets the crowd on fire. The commands are numerous, and it really is indispensable to look up the manual, but the base is there: a dungeon crawling with monsters, a lot of character stats, a labyrinth created via procedural generation, and a lot of deaths. If you are a fan of roguelikes, definitely check it out.

$ sudo apt-get install nethack-console (for Ubuntu/Debian)
$ sudo pacman -S nethack (for Archlinux)

9. cgames

Another game that I really enjoy is Sokoban, the logic game where you have to push crates up to a target. However I found much better than just a game of Sokoban to play from the terminal, I found a whole pack of logic games to play from the terminal. The program cgames contains csokoban, cmines, and cblocks, which are all respectively a game a Sokoban, of minesweeper, and of sliding-block puzzle.

To try it out on Ubuntu/Debian, dowload it from the official page, extract and from the directory run:

$ sudo apt-get install libgpm-dev libncurses5-dev
$ ./configure --with-ncurses
$ make
$ sudo make install
$ csokoban (or cmines or cblocks) to launch the respective games

And as usual, the package is in AUR for Archlinux.

10. BSD-Games

Finally, it would be awful not to talk about BSD-Games. This package is a small library of games and fun applications. To cite only a few, you can find a hangman, a banner utility, a program to decrypt Caesar cyphers, a Star Trek simulator, and a funny reference to the movie WarGames. Here is the link to the complete list of applications.

To install, run:

$ sudo apt-get install bsdgames (on Ubuntu/Debian)
$ sudo pacman -S bsd-games (on Archlinux)

As a conclusion, I would like to applaud the blog ttygames.wordpress.com for trying to list all the terminal games out there. I stumbled upon it while looking for the various clones of NetHack. I got to say that the work done is pretty impressive. Bravo!

Like I said in the introduction, it would be impossible to list all the games out there (hurrah for open source!), but if you really like a game not listed here, please feel free to share it. Maybe we'll do another list in a future post.

Subscribe to Xmodulo

Do you want to receive Linux FAQs, detailed tutorials and tips published at Xmodulo? Enter your email address below, and we will deliver our Linux posts straight to your email box, for free. Delivery powered by Google Feedburner.

The following two tabs change content below.

Adrien Brochard

I am a Linux aficionado from France. After trying multiple distributions, I finally settled for Archlinux. But I am always trying to improve my system by stacking up tips and tricks.
Your name can also be listed here. Write for us as a freelancer.

Latest posts by Adrien Brochard (see all)

21 thoughts on “What are games to play from a Linux terminal?

  1. Thank you for sharing. Not a big gamer but I did enjoy greed and tried 2048 (web version) for the first time.

  2. Well i used to play horror game "sudo apt-get dist-upgrade", but it's not so much fun as it used to be...

    • dwarf fortress is obviously a great classic, although the console mode has crippled controls (no Ctrl+numpad key support). It has much smoother performance than the "graphic" version though.

  3. Nice collection! Dwarf Fortress would be perfect for this, but alas it was made for Windows... Though I hear it can be hacked around and played in both the terminal and over the web.

  4. ski is really a clone of an old dos game called klotski. very famous old game if some of you may remember.

  5. Thanks for a great list of games! Just to note a small typo. For game #9 cgames, the debian/ubuntu package is " libgpm-dev" and not "libpm-dev". So:

    $ sudo apt-get install libgpm-dev libncurses5-dev

Leave a comment

Your email address will not be published. Required fields are marked *

Current ye@r *