Get competitive and play the famed puzzle game at the command line

Tetris is easily the most famous puzzle game of all time so to celebrate its birthdays we show you how to play Tetris in the terminal.

Why the terminal? Because why not! Besides, I associate the terminal with being productive. So, this way, I can kinda fool myself in to thinking I’m doing something properly! 😉

With estimated sales of 170 million, Tetris is one of the best selling games of all time

Now, chances are you know of Tetris. That counts even if you’ve never played it. In fact, most people would struggle to think of a falling blocks game other than Tetris (sorry Columns, you tried).

So to mark this particular puzzle game’s anniversary I figured I’d show you how to play Tetris in a terminal emulator of your choice.

Whether you’re wedded to Tilix, cosy with Guake, or keeping things vanilla with GNOME Terminal, you already everything you need to play command line Tetris on Linux — as you’ll soon see!

Happy Birthday, Tetris!

Nintendo Game Boy, the console which made Tetris famous

Tetris is one of the best selling games of all time with estimated sales of 170 million over the past 35 years, across multiple platforms. Even my beloved Amstrad CPC got a port.

The first commercially available version of the famed game of falling blocks game was released on June 6, 1984, created by Russian game designer Alexey Leonidovich Pajitnov.

While Tetris found success early on it was with the Nintendo Game Boy to which it become a mainstream hit. The handheld console even bundled a free copy of the game for a time, further cementing the puzzle game in the public consciousness.

The success of the original game meant, inevitably, that imitations soon followed. A veritable stack of would-be and wannabe Tetris clones were (and still are) made, with unofficial recreations even cropping up as playable easter eggs on lab equipment!

In all its guises Tetris still going strong today. The most recent ‘official’ version is Tetris 99, a Battle Royale-style multiplayer version, available exclusively on the Nintendo Switch.

Play Tetris in a Terminal on Linux

A veritable stack of Tetris clones are available on Linux and other platforms — more than enough to fill several blog posts several times over! Better yet, most of them are playable outside of the Linux terminal, too.

But since I think there’s something unabashedly nerdy and, yes, cool, about being able to play Tetris in the terminal, that’s what this post focuses on.

Hate CLI? Check out Quadrapassel. It’s a free GUI Tetris clone that’s available in the repos of most major Linux distributions (as well as the Snap Store).

Below, I highlight two different versions of “Tetris” you can play at the command line: one is basic, but easy to install, while the other is more flashy, but requires a binary download.

Nver played Tetris? The concept is this: rotate and reposition blocks as they fall to create horizontal rows (lines) which disappear and score you points when made. The more points you score the faster the blocks fall. When the stack gets too high the game is over.

Option 1: Tint Tetris

We highlighted the terrific terminal Tetris clone Tint way back in 2009 (yes, we’ve been around that long) but I’m pleased to say it still stands up today.

Tint tries to stay as close to the original game as possible, but there are a few small differences

Tint tries to veer ‘as close to the original game as possible’, but there are a couple of notable differences. For instance, there’s no ‘preview’ of the next block to drop. This is a basic feature that I find particularly helpful

The play screen does keep track of your score, including how many lines you’ve made. There’s also a statistics section to keep track on the number of specific tetronimoes that fall.

A (minor) downside to Tint is that doesn’t let you use your keyboard’s arrow keys to rotate or speed up blocks, only reposition them.

To install Tint on Ubuntu, Linux Mint, Peppermint OS and other related distros run this command:

sudo apt install tint

To play the game run:

tint

Enter a number from 1-9 to pick a level (1 being easiest, 9 being hardest).

Option 2: Sam Tay’s Tetris

Tint is impressive, but it’s Sam Tay’s open-source ASCII implementation of Tetris that is my own personal go-to version.

The dotted grid behind the play area makes it easier to gauge exactly where tetronimoes will fall

His version looks much nicer. It has a cleaner, spacier layout, and the dotted grid behind the play area and use of shadows makes it much easier to gauge exactly where tetronimoes will fall.

Like the Game Boy version, there’s a handy “preview” window to see you which block is coming up next (which might inform where you put the current piece).

I’m pleased to say that in this version you can use your keyboard arrow keys to reposition and rotate blocks. If you need to pee or answer the door during the middle of a round just hit the p key to temporarily pause the game.

Source code, a precompiled binary, and instructions for running this game as a Docker image are can be found on GitHub. Ubuntu users may prefer to install the game from the Snap Store:

sudo snap install tetris-thefenriswolf

To play the game run:

tetris-thefenriswolf

Let me know what you think of the game down in the comments!