13 Best Command Line Games For Linux

Best Command line games for Linux have not gone away even though many engaging GUI-based options exist. These games offer many advantages over games with rich graphics, such as being lightweight and requiring minimal use of system resources.

Being lightweight does not make these games limited in the features they offer. Sure there is the simple game of Snake, a clone from the Nokia game era, but there are many others that focus on storytelling, strategy, and problem-solving.


In this post, we will explore the 15 best terminal-based games for Linux, chosen based on their popularity, gameplay, and overall user experience. I will provide a brief overview of each and go over how to install it on Linux.

13 Best Linux Command Line Games You Can Play In Terminal

1. Angband

Angband, is a classic dungeon-crawling game. Angband expands upon the mechanics of its predecessors, such as Rogue and Moria, by offering a larger and more diverse game world, an extensive bestiary, and numerous character customization options.

In Angband, players create a character by selecting a race, class, and background. Each choice influences the character’s starting attributes, skills, and abilities, allowing for a wide range of customization.

Players then embark on a quest to descend into the depths of Angband, a 100-level dungeon, and defeat Morgoth, the ultimate enemy. Along the way, players will battle monsters, find equipment, and gain experience to improve their character’s abilities. The game features a procedurally generated dungeon, ensuring that each playthrough offers a unique experience. Angband also includes a wide array of items, spells, and abilities, providing players with numerous tactical options during combat.

Linux Angman Game Character Screen


To install Angband on a Linux system and run it, open the terminal and run the following commands:

### Install
sudo apt install angban

### Run 

Angband Website: http://rephial.org/

Angband Github: https://github.com/angband/angband

2. Backgammon

GNU Backgammon is a terminal-based adaptation of the classic board game, Backgammon. This open-source implementation offers the recreation of the original game while providing advanced features such as a strong AI opponent, analysis tools, and an intuitive text-based interface.

GNU Backgammon’s gameplay follows the traditional rules of Backgammon, where two players take turns rolling dice and moving their checkers across the board according to the roll results.

The objective is to move all of your checkers to your home board and then bear them off before your opponent does the same.

Linux Backgammon Game


To install Backgammon on a Linux system and run it, open the terminal and run the following commands:

### Install
sudo apt install bsdgames
sudo apt install bsdgames-nonfree

### Run 

Rogue Website: https://github.com/davidslv/rogue

3. Cataclysm: Dark Days Ahead

Cataclysm, Dark Days Ahead (CDDA) is a popular open-source, strategy-based survival game set in a post-apocalyptic world.

Originally a fork of the discontinued Cataclysm project, CDDA has since evolved into a highly immersive and complex game with a massive and dedicated community. The game features turn-based gameplay and procedurally generated worlds, providing players with a unique experience in each playthrough.

In this unforgiving environment, players must manage their character’s needs while fending off threats such as zombies, mutants, and other survivors.

Start by creating a character, choosing from a wide array of professions, traits, and skills. Each character has specific attributes, such as strength, dexterity, and intelligence, which can be improved throughout the game.

Linux Cataclysm Main Screen
Cataclysm Main Screen Once The Character Is Created

Once the character is created, you are thrust into the post-apocalyptic world with the primary objective of survival.


To install Cataclysm on a Linux system and run it, open the terminal and run the following commands:

### Install
sudo apt install cataclysm-dda-curses

### Run 

Cataclysm Website: https://cataclysmdda.org/

4. Dwarf Fortress

Dwarf Fortress, is a highly complex and in-depth simulation game that has garnered a dedicated following since its initial release in 2006. The game features two main modes: Dwarf Fortress mode, where players manage a colony of dwarves and build a fortress, and Adventure mode, which allows players to explore the game’s vast, procedurally generated world as a single character. This game has a steep learning curve and you may want to look at the documentation first.

In Dwarf Fortress mode, players begin by selecting a location for their fortress, considering factors such as resources, terrain, and potential threats.

Once the site is chosen, players assign tasks to their dwarves, such as mining, farming, and crafting, to build and maintain their fortress. The game’s deep simulation mechanics include intricate economic systems, social interactions, and a wide array of skills for the dwarves to develop.

Players must defend their fortress against various threats, including invasions, cave-ins, and even the psychological well-being of their dwarves. Adventure mode, on the other hand, allows players to explore the vast, procedurally generated world as a single character, completing quests, fighting monsters, and interacting with NPCs.


To install Dwarf on a Linux system and run it, open the terminal and run the following commands:

### Install
sudo apt install dwarf-fortress

### Run 

Dwarf Fortress Website: http://www.bay12games.com/dwarves/

Dwarf Fortress Wiki: http://dwarffortresswiki.org/index.php/Main_Page

5. Greed

Greed, created by Matt Day in 1992, is a classic terminal-based puzzle game that combines strategy and quick thinking.

The objective of Greed is to collect as many points as possible by navigating through a grid filled with numbered cells. Players control a cursor, which moves in straight lines, consuming cells and accumulating points based on the value of the cells.

Once a cell is consumed, it turns into a wall, which the cursor cannot pass through. The game ends when the player becomes trapped and is unable to make any more moves.

Linux Game Greed


To install Greed on a Linux system and run it, open the terminal and run the following commands:

### Install
sudo apt install greed

### Run 

Greed Github: https://github.com/obluda/greed

6. Moon-Buggy

Moon-Buggy, developed in 1998, is a simple yet addictive terminal-based game inspired by the classic Atari game Moon Patrol. In Moon-Buggy, players control a small lunar rover tasked with traversing the treacherous surface of the moon, avoiding obstacles, and jumping over craters.

The objective of Moon-Buggy is to drive the lunar rover as far as possible while avoiding obstacles and craters. The game features side-scrolling action, with the rover automatically moving forward while the player controls its speed and jumps. Players must time their jumps carefully to clear craters and avoid crashing into obstacles.

The game tracks the player’s distance traveled, with a simple goal and that is to beat their previous high score.

Linux Moon-Buggy Game


To install moon-buggy on a Linux system and run it, open the terminal and run the following commands:

### Install
sudo apt install moon-buggy

### Run 

Moon-Buggy Website: http://rephial.org/

Moon-Buggy Github: https://github.com/seehuhn/moon-buggy

7. Nethack

NetHack is an open source, single-player game featuring randomly generated dungeons, turn-based gameplay, and an extensive collection of in-game objects, monsters, and traps. The game’s goal is simple: retrieve the Amulet of Yendor, hidden deep within the dungeon, and ascend to become a demigod.

NetHack is known for its depth, complexity, and steep learning curve, as well as its reliance on player creativity and problem-solving skills. The game is filled with secrets, hidden mechanics, and a rich lore that rewards exploration and experimentation.

When you start the game you begin by choosing a character class (such as a warrior, wizard, or rogue), a race (human, elf, dwarf, or gnome), and a gender (male, or female). Each character class and race comes with its own unique abilities and attributes, which can be developed and improved throughout the game.

As you navigate the dungeon, you will encounter various monsters, acquire new equipment and magical items, and solve puzzles to progress further.

Linux Nethack Player Info


To install NetHack on a Linux system and run it, open the terminal and run the following commands:

### Install
sudo apt install nethack-console

### Run 

Nethack Website: https://www.nethack.org/

8. Ninvaders

Ninvaders, is a terminal-based adaptation of the iconic arcade game Space Invaders. This tribute to the classic game brings the excitement of the alien invasion to the Linux terminal with ASCII art graphics and simple, responsive controls.

In Ninvaders, players control a spacecraft that moves horizontally across the bottom of the screen, shooting down invading alien ships that descend from the top. The game is divided into levels, with each level presenting new challenges and increasing difficulty. As players progress through the levels, they must defeat bosses and collect power-ups to improve their ship’s weaponry and defenses.

The gameplay of Ninvaders is fast-paced and challenging, with players having to dodge incoming enemy fire while simultaneously returning fire. The game’s colorful graphics and sound effects give it a fun and engaging atmosphere, making it appealing to players of all ages.

Linux Ninvaders Game


To install Ninvaders on a Linux system and run it, open the terminal and run the following commands:

### Install
sudo apt install ninvaders

### Run 

Ninvaders Github: https://github.com/TheZ3ro/ninvaders

9. PacMan4Console

Pacman for Console (Pacman4console), is a terminal-based adaptation of the iconic arcade game Pac-Man. Developed by Mike Billars, this lightweight and faithful recreation brings the classic maze-chase gameplay to the Linux terminal, complete with its familiar characters, sound effects, and gameplay mechanics.

Pacman4console offers a nostalgic and entertaining way to experience Pac-Man in a text-based environment.

The objective of Pacman4console is to guide Pac-Man through a maze filled with dots, consuming them while avoiding the four ghosts that roam the maze. Players must collect all the dots in the maze to advance to the next level, all the while evading contact with the ghosts. Power pellets, located in the corners of the maze, temporarily empower Pac-Man to eat the ghosts, which can then be chased down for bonus points.

Linux Pacman4Console Game

How to Intall PacMan4Console

To install Ninvaders on a Linux system and run it, open the terminal and run the following commands:

### Install
sudo apt install pacman4console

### Run 

10. Rogue

Rogue, is an iconic game set in a dungeon filled with monsters, traps, and treasures. Rogue challenges players to navigate its procedurally generated levels in search of the Amulet of Yendor. The game’s permadeath feature and ASCII graphics, which were groundbreaking at the time, continue to provide a captivating and challenging experience for fans of terminal-based games.

In Rogue, players create a character and embark on a journey through the dungeon’s increasingly difficult levels. The game features turn-based gameplay, with players and monsters taking turns to move, attack, or use items. As players progress, they will find various items, such as weapons, armor, and magical scrolls, to aid them in their quest.

Players must also manage their character’s health and hunger while exploring the dungeon.

Linux Rogue Game


To install Rogue on a Linux system and run it, open the terminal and run the following commands:

### Install
sudo apt install bsdgames
sudo apt install bsdgames-nonfree

### Run 

Alternatively, you can download the source code for Rogue from its GitHub repository, and compile it yourself. Follow the provided instructions to compile and install the game from the source.

Rogue Website: https://github.com/davidslv/rogue

11. Sudoku

Sudoku is a popular number-based logic puzzle that has found its way into the Linux terminal as a command-line game. Played on a 9×9 grid divided into 3×3 subgrids, the goal of Sudoku is to fill each row, column, and subgrid with the numbers 1 to 9, without repeating any numbers within those constraints.

The terminal-based Sudoku game offers a simple and accessible way to enjoy this classic puzzle without the need for a graphical interface, making it perfect for a quick, mentally stimulating gaming session.

Linux Sudoku Game


To install Ninvaders on a Linux system and run it, open the terminal and run the following commands:

### Install
sudo apt install sudoku

### Run 

12. Zangband

Zangband, stands for “Zelazny Angband,” which is a popular variant of the classic game Angband. Zangband builds upon the original game’s mechanics, while introducing new features and gameplay elements inspired by the works of fantasy author Roger Zelazny.

Like Angband, Zangband allows players to create a character by selecting a race, class, and background, which determine the character’s starting attributes, skills, and abilities.

Players embark on a quest to descend into the depths of the dungeon and defeat the ultimate enemy, the Serpent of Chaos. Along the way, they will encounter various monsters, find powerful items, and gain experience to improve their character’s abilities.

Zangband expands upon the original game by offering additional races and classes, such as the Amberite, Golem, and Chaos Warrior. The game also features an open-world wilderness area, which connects multiple towns and dungeons, providing a greater sense of exploration and adventure.

Linux Zangband Game


To install Zangband on a Linux system and run it, open the terminal and run the following commands:

### Install
sudo apt install zangband

### Run 

Zangband Github: https://github.com/sohailzahid/Zangband

13. 2048-CLI

2048-CLI is a terminal-based version of the popular puzzle game 2048, originally created by Gabriele Cirulli. This addictive and straightforward game has been adapted for the command-line interface, allowing Linux users to enjoy its simple yet challenging gameplay without the need for a graphical environment. Its minimalistic design and easy-to-learn mechanics make 2048-CLI a perfect choice for a quick and entertaining gaming session.


The goal of 2048-CLI is to combine numbered tiles on a 4×4 grid until a tile with the value of 2048 is created. Players can slide tiles up, down, left, or right, and tiles with the same number will merge when pushed together. After each move, a new tile with a value of 2 or 4 appears randomly on the grid. The game continues until no more moves are available, with the player’s score calculated based on the values of merged tiles. 2048-CLI’s simple mechanics and intuitive controls make it easy to pick up and play, while the increasingly difficult puzzle challenges players to devise strategic approaches to reach the coveted 2048 tile.


To install 2048 on a Linux system and run it, open the terminal and run the following commands:

### Install
sudo apt install libncurses5-dev              ### May be needed for some Linux versions
sudo apt install libsdl2-dev libsdl2-ttf-dev  ### May be needed for some Linux versions
sudo apt install 2048

### Run 

2048 Github: https://github.com/tiehuis/2048-cli

Tips For Playing Linux Terminal Games

  1. Familiarize yourself with the controls: Terminal-based games often have unique control schemes that may differ from what you’re used to in graphical games. Before diving into a new game, take some time to learn the controls and practice basic movements and actions. Many games provide in-game help or documentation to help you get started.
  2. Customize your terminal: The appearance and functionality of your terminal can have a significant impact on your gaming experience. Experiment with different fonts, color schemes, and terminal settings to create an environment that’s both visually appealing and easy to navigate. You may also want to try different terminal emulators to find one that best suits your needs and preferences.
  3. Learn to navigate with the keyboard: Many terminal-based games rely heavily on keyboard navigation, so it’s essential to become comfortable using your keyboard to move around and interact with the game world. Familiarize yourself with common keyboard shortcuts and commands, and practice using them regularly to improve your efficiency and gameplay.
  4. Be patient and persistent: Terminal-based games can be challenging, particularly if you’re new to this style of gaming. Don’t be discouraged by initial difficulties or setbacks; with practice and persistence, you’ll improve your skills and be able to tackle even the most challenging games.
  5. Save your progress: Since terminal-based games often lack the sophisticated auto-save features found in modern graphical games, it’s crucial to save your progress regularly. Most games provide a save or checkpoint system to help you preserve your progress, so be sure to make use of it to avoid losing hours of gameplay.
  6. Explore the community: Many terminal-based games have dedicated communities of players who are eager to share tips, strategies, and resources to help others enjoy their gaming experience. Join forums, mailing lists, or social media groups related to your favorite games to connect with other players, learn from their experiences, and even make new friends.


In this post I went through Linux terminal-based games that you can play simply by typing a command. Immerse yourself in a world of adventure, strategy, and imagination no matter which game you choose. Enjoy!

So enjoy these and let me know if there are other you like playing so I can add them to a later post.

If you know of another game that should be on this list then do let me know in the comments. I would not mind creating another post with more games.