Home Linux Gaming 10 Free Racing Games to Play on Ubuntu Terminal

10 Free Racing Games to Play on Ubuntu Terminal

From nostalgic ASCII-based games to inventive text-based adventures, these games are sure to provide plenty of entertainment for those times when you need a quick break from work.

by Kiran Kumar
Published: Updated:
10 best free racing games for ubuntu

In the world of Ubuntu Linux, the terminal is not just a place for commands and system operations, it also hosts a variety of interesting and exciting games, including racing games. These games might not have dazzling graphics or realistic physics, but they offer pure, undiluted fun.

There is an impressive assortment of games hidden in the Ubuntu Linux terminal that can provide hours of entertainment. In this post, I am going to share with you my top 10 free racing games that you can play on your Ubuntu Linux terminal. I will also include some hands-on examples and pro tips to enhance your gaming experience. So, let’s get the adrenaline pumping!

10 Free Racing Games to Play on Ubuntu Terminal

1. Nsnake: The classic reborn

playing snake game on linux

Playing snake game on Ubuntu

First on our list is Nsnake. This is a terminal version of the classic Snake game, and while not a racing game in the traditional sense, it is a race against time, which is often more thrilling. You control a continuously moving snake that grows longer each time it consumes an item. The game’s challenge lies in controlling the snake’s direction without colliding with the screen’s border or the snake’s body.

To install Nsnake, simply type the following command in your terminal:

sudo apt-get install nsnake

To play the game, just type nsnake in the terminal. Use the arrow keys to control the direction of the snake.

Pro tips: The faster you are, the more points you score. But remember, speed is not the only factor; you also need precision to avoid hitting the walls or the snake’s body.

2. Moon Buggy: Jump over craters

playing moon buggy on linux terminal

Playing Moon-Buggy on Linux Terminal

Moon Buggy is an entertaining game where you drive a car on the moon’s surface and leap over craters. The game might seem simple initially but becomes more challenging as the speed increases, and the frequency of craters becomes higher. The key to mastering this game is perfect timing.

You can install it by entering the following command in your terminal:

sudo apt-get install moon-buggy

Start the game by typing moon-buggy. Use the space bar to jump over the craters.

Pro tips: Timing your jumps accurately is the key to success in this game. Jump too early or too late, and you’ll crash into a crater.

3. ninvaders: Repelling Alien Invaders

playing space invaders on ubuntu

Playing Space Invaders on Ubuntu

nInvaders is a terminal-based game for Linux that brings back the nostalgic memories of the classic arcade game Space Invaders. It’s a simple yet entertaining game that perfectly showcases how a terminal can be much more than a place to type commands.

Here’s how you can install nInvaders on your Ubuntu terminal:

sudo apt-get install ninvaders

To start the game, just type ninvaders in your terminal.

Use the left and right arrow keys to move your laser cannon and space bar to fire. The goal is to destroy all aliens before they reach the bottom of the screen.

Pro tip: In nInvaders, patience and strategy are key. Instead of focusing on shooting rapidly, concentrate on the pattern of the alien spaceships. The spaceships follow a predictable left-to-right, down, right-to-left, down pattern. Position your laser cannon accordingly and fire strategically to maximize the impact. Aim to hit the leading spaceship in the row. This will create a gap, giving you more time before the invaders descend closer to your cannon. Also, remember to keep an eye out for the faster, bonus UFOs that occasionally cross the screen for extra points.

4. Cmatrix: The matrix race

displaying matrix on ubuntu terminal

Displaying Matrix on Ubuntu Terminal

Cmatrix isn’t technically a racing game. But, it gives you the feeling of racing through the iconic digital rain of the Matrix universe.

You can install it by using the command:

sudo apt-get install cmatrix

To run the game, type cmatrix in your terminal.

Pro tips: There’s no winning or losing here. So just sit back and enjoy the mesmerizing view.

5. ASCIIpOrtal: The teleport race

playing asciiportal on ubuntu

Playing ASCIIpOrtal on Ubuntu

ASCIIpOrtal is a unique game where you can create portals to navigate through different levels. You navigate through a series of rooms by creating two portals: an entrance (cyan colored) and an exit (yellow colored). When your character or any object enters one portal, they emerge from the other, maintaining the momentum they had when entering the first portal. By cleverly positioning these portals, you can bypass obstacles, redirect projectiles, and even reach otherwise inaccessible areas.

Here’s how to play:

  • Move your character using the arrow keys or ‘W’, ‘A’, ‘S’, ‘D’.
  • Aim with the mouse pointer.
  • Create a cyan portal with the left mouse button, and a yellow portal with the right mouse button.
  • Press ‘R’ to restart the level if you get stuck.

To install ASCIIpOrtal, use the following command:

sudo apt-get install asciijump

To play, just type asciijump.

Pro tips: Plan your portal placements carefully. Unplanned placements might lead you to endless loops!

6. Nethack: The dungeon race

playing nethack on ubuntu

Playing Nethack on Ubuntu

Nethack is an amazing dungeon exploration game where you race against monsters and navigate through mazes. One of the defining characteristics of NetHack is that each playthrough is procedurally generated, meaning no two games are the same. You can choose to be one of many characters, such as a knight, wizard, rogue, or even a tourist. Each character class has unique abilities and characteristics that offer different strategies to gameplay. The dungeons you explore, the monsters you battle, and the loot you find are all randomly generated each time you play.

To install it, use this command:

sudo apt-get install nethack-console

To play, type nethack.

Pro tips: Nethack is a very complex game. Take your time to understand the mechanics and use your resources wisely.

7. Greed: The block racing

playing greed on ubuntu terminal

Playing Greed on Ubuntu Terminal

Greed is a game where you race to clear as many blocks as possible. The goal of the game is to remove as many numbers from the grid as possible. The catch, however, is in the way these numbers are removed.

When you start Greed, you will be placed on a grid filled with random two-digit numbers. You move your cursor (the @ symbol) to a number, which causes that number and a trail of numbers to disappear from the grid, leaving behind a trail of dots.

The number you move to determines how many steps you take in the direction you moved. For example, if your cursor is on the number 14, and you move right, you would move fourteen steps to the right, consuming all numbers in your path.

If you find yourself in a position where you can’t move the full length of the number you’re on in any direction, the game is over. Your score is calculated based on the numbers you’ve removed from the grid, and the aim is to get the highest score possible.

You can install it by using this command:

sudo apt-get install greed

To play, type greed and use arrow keys to navigate.

Pro tips: Strategize your moves. Each decision you make impacts the available moves you have for the future.

8. Pacman4console: The ghost race

playing pacman4console on ubuntu terminal

Playing Pacman4console on Ubuntu Terminal

Pacman4console is a terminal version of the classic Pacman game. If you’ve ever played or heard about Pacman, you’ll find Pacman4Console very familiar. In the game, you control Pacman, who must navigate through a maze filled with dots. Your goal is to eat all the dots in the maze while avoiding the ghosts that roam around. Eating large flashing dots, known as “power pellets”, makes the ghosts vulnerable for a short time, allowing Pacman to eat them for extra points.

The maze in Pacman4Console, like the original, has wraparound tunnels on the sides, which Pacman and the ghosts can use to quickly traverse the map. The game becomes more challenging as you progress, with the ghosts getting faster and the power pellets’ effects lasting for shorter periods.

To install, use the following command:

sudo apt-get install pacman4console

To play, type pacman4console.

Pro tips: Always keep an eye on the ghosts’ movement. Anticipating their direction can save you from being cornered.

9. BSD Games: Embrace Retro Gaming

playing bsd games on ubuntu terminal

Playing Hunt BSD games on Ubuntu Terminal

BSD Games is a package that includes a variety of classic command line games. Some of the popular games in this package include adventure, hangman, snake, hunt, tetris and more. If you’re looking for a game similar to Pac-Man, you might enjoy “snake” or “hunt” in this package.

To install BSD Games on Ubuntu, use the following command:

sudo apt-get install bsdgames

Once the package is installed, you can start any game by typing its name into the terminal. For example, to play snake, you would type snake in your terminal. Note that some games may have different controls, so be sure to read any instructions provided.

Pro tip: Many games in the BSD Games package are very traditional and may not provide instructions upfront. You can usually find the game rules or controls by using the ‘man’ command followed by the game name, for example man snake.

10. Bastet: The block race

playing bastet on ubuntu terminal

Playing Bastet on Ubuntu Terminal

Last but not least, Bastet is a terminal version of the classic game Tetris. As you might know, Tetris is a tile-matching puzzle game where the player has to arrange falling blocks of different shapes in such a way that they form a complete line. When such a line is formed, it disappears, and the player earns points.

What sets Bastet apart from the original game is its block selection algorithm. In regular Tetris, the upcoming piece is selected randomly. However, in Bastet, the algorithm always chooses the worst block possible, making the game notably more challenging and arguably frustrating than classic Tetris.

To install it, use the following command:

sudo apt-get install bastet

To play, type bastet.

Pro tips: Always keep an eye on the upcoming blocks. Plan your placements accordingly to avoid getting stuck with a block that does not fit anywhere.


These are the ten free racing games I enjoy playing on my Ubuntu Linux terminal. Each of them has their own unique charm and challenges that I find engaging and fun. So, give them a try, and let me know what you think. I hope you find them as thrilling and enjoyable as I do. What other games would you like to recommend? Please feel free to use the comment section below to let other FOSS Linux readers know about your interesting game!

You may also like

Leave a Comment



FOSS Linux is a leading resource for Linux enthusiasts and professionals alike. With a focus on providing the best Linux tutorials, open-source apps, news, and reviews written by team of expert authors. FOSS Linux is the go-to source for all things Linux.

Whether you’re a beginner or an experienced user, FOSS Linux has something for everyone.

Follow Us


©2016-2023 FOSS LINUX



“Linux” is the registered trademark by Linus Torvalds in the U.S. and other countries.