十大 Linux 命令行游戏
游戏 终端

> 
> 概要： 本文列举了 Linux 中最好的命令行游戏。
> 
> 
> 


![](/data/attachment/album/201801/23/231932sljm5xwlevsrfa8z.jpg)


Linux 从来都不是游戏的首选操作系统，尽管近日来 [Linux 的游戏](/article-7316-1.html)提供了很多，你也可以从许多资源[下载到 Linux 游戏](https://itsfoss.com/download-linux-games/)。


也有专门的 [游戏版 Linux](https://itsfoss.com/manjaro-gaming-linux/)。没错，确实有。但是今天，我们并不是要欣赏游戏版 Linux。


Linux 有一个超过 Windows 的优势。它拥有一个强大的 Linux 终端。在 Linux 终端上，你可以做很多事情，包括玩 **命令行游戏**。


当然，我们都是 Linux 终端的骨灰粉。终端游戏轻便、快速、有地狱般的魔力。而这最有意思的事情是，你可以在 Linux 终端上重温大量经典游戏。


### 最好的 Linux 终端游戏


来揭秘这张榜单，找出 Linux 终端最好的游戏。


#### 1. Bastet


谁还没花上几个小时玩[俄罗斯方块](https://en.wikipedia.org/wiki/Tetris)？它简单而且容易上瘾。 Bastet 就是 Linux 版的俄罗斯方块。


![Linux 终端游戏 Bastet](/data/attachment/album/201801/23/231939o0ll5a3ahq35q3hz.jpg)


使用下面的命令获取 Bastet：



```
sudo apt install bastet

```

运行下列命令，在终端上开始这个游戏：



```
bastet

```

使用空格键旋转方块，方向键控制方块移动。


#### 2. Ninvaders


Space Invaders（太空侵略者）。我仍记得这个游戏里，和我兄弟为了最高分而比拼。这是最好的街机游戏之一。


![Linux 终端游戏 nInvaders](/data/attachment/album/201801/23/231940pk0fcl00cf80stzs.jpg)


复制粘贴这段代码安装 Ninvaders。



```
sudo apt-get install ninvaders

```

使用下面的命令开始游戏：



```
ninvaders

```

方向键移动太空飞船。空格键射击外星人。


[推荐阅读：2016 你可以开始的 Linux 游戏 Top 10](https://itsfoss.com/best-linux-games/)


#### 3. Pacman4console


是的，这个就是街机之王。Pacman4console 是最受欢迎的街机游戏 Pacman（吃豆人）的终端版。


![Linux 命令行吃豆豆游戏 Pacman4console](/data/attachment/album/201801/23/231941sbqvnnod65udqmum.jpg)


使用以下命令获取 pacman4console：



```
sudo apt-get install pacman4console

```

打开终端，建议使用最大的终端界面。键入以下命令启动游戏：



```
pacman4console

```

使用方向键控制移动。


#### 4. nSnake


记得在老式诺基亚手机里玩的贪吃蛇游戏吗？


这个游戏让我在很长时间内着迷于手机。我曾经设计过各种姿态去获得更长的蛇身。


![nsnake : Linux 终端上的贪吃蛇游戏](/data/attachment/album/201801/23/231942rx3l5lxzpy21l4y2.jpg)


我们拥有 [Linux 终端上的贪吃蛇游戏](https://itsfoss.com/nsnake-play-classic-snake-game-linux-terminal/) 得感谢 [nSnake](https://itsfoss.com/nsnake-play-classic-snake-game-linux-terminal/)。使用下面的命令安装它：



```
sudo apt-get install nsnake

```

键入下面的命令开始游戏：



```
nsnake

```

使用方向键控制蛇身并喂它。


#### 5. Greed


Greed 有点像 Tron（类似贪吃蛇的进化版），但是减少了速度，也没那么刺激。


你当前的位置由闪烁的 ‘@’ 表示。你被数字所环绕，你可以在四个方向任意移动。


你选择的移动方向上标识的数字，就是你能移动的步数。你将重复这个步骤。走过的路不能再走，如果你无路可走，游戏结束。


似乎我让它听起来变得更复杂了。


![Greed : 命令行上的 Tron](/data/attachment/album/201801/23/231944eszk777q3bdpqq83.jpg)


通过下列命令获取 Greed：



```
sudo apt-get install greed

```

通过下列命令启动游戏，使用方向键控制游戏。



```
greed

```

#### 6. Air Traffic Controller


还有什么比做飞行员更有意思的？那就是空中交通管制员。在你的终端中，你可以模拟一个空中交通系统。说实话，在终端里管理空中交通蛮有意思的。


![Linux 空中交通管理员](/data/attachment/album/201801/23/231946z2begppnz94fne7g.jpg)


使用下列命令安装游戏：



```
sudo apt-get install bsdgames

```

键入下列命令启动游戏：



```
atc

```

ATC 不是孩子玩的游戏。建议查看官方文档。


#### 7. Backgammon（双陆棋）


无论之前你有没有玩过 [双陆棋](https://en.wikipedia.org/wiki/Backgammon)，你都应该看看这个。 它的说明书和控制手册都非常友好。如果你喜欢，可以挑战你的电脑或者你的朋友。


![Linux 终端上的双陆棋](/data/attachment/album/201801/23/231947ct4qz40b0ti84zyc.jpg)


使用下列命令安装双陆棋：



```
sudo apt-get install bsdgames

```

键入下列命令启动游戏:



```
backgammon

```

当你提示游戏规则时，回复 ‘y’ 即可。


#### 8. Moon Buggy


跳跃、开火。欢乐时光不必多言。


![Moon buggy](/data/attachment/album/201801/23/231948u0qk59kj5ws006yy.jpg)


使用下列命令安装游戏：



```
sudo apt-get install moon-buggy

```

使用下列命令启动游戏：



```
moon-buggy

```

空格跳跃，‘a’ 或者 ‘l’射击。尽情享受吧。


#### 9. 2048


2048 可以活跃你的大脑。[2048](https://itsfoss.com/2048-offline-play-ubuntu/) 是一个策咯游戏，很容易上瘾。以获取 2048 分为目标。


![Linux 终端上的 2048](/data/attachment/album/201801/23/231949k6dui5detu2ctqqq.jpg)


复制粘贴下面的命令安装游戏：



```
wget https://raw.githubusercontent.com/mevdschee/2048.c/master/2048.c

gcc -o 2048 2048.c

```

键入下列命令启动游戏：



```
./2048

```

#### 10. Tron


没有动作类游戏，这张榜单怎么可能结束？


![Linux 终端游戏 Tron](/data/attachment/album/201801/23/231950rp6jbphmkxip1zri.jpg)


是的，Linux 终端可以实现这种精力充沛的游戏 Tron。为接下来迅捷的反应做准备吧。无需被下载和安装困扰。一个命令即可启动游戏，你只需要一个网络连接：



```
ssh sshtron.zachlatta.com

```

如果有别的在线游戏者，你可以多人游戏。了解更多：[Linux 终端游戏 Tron](https://itsfoss.com/play-tron-game-linux-terminal/)。


### 你看上了哪一款?


伙计，十大 Linux 终端游戏都分享给你了。我猜你现在正准备键入 `ctrl+alt+T`（终端快捷键） 了。榜单中那个是你最喜欢的游戏？或者你有其它的终端游戏么？尽情分享吧！




---


via: <https://itsfoss.com/best-command-line-games-linux/>


作者：[Aquil Roshan](https://itsfoss.com/author/aquil/) 译者：[CYLeft](https://github.com/CYleft) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
![Warp Terminal](/assets/images/warp-terminal.webp)


![Warp Terminal](/assets/images/warp-terminal.webp)

You can play games on the Linux terminal. Here are the best command line games for you.

Linux has never been the first preference among operating systems for gaming. However, [gaming on Linux](https://itsfoss.com/linux-gaming-guide/) has evolved, and now, even a new user can try to play the latest games on Linux.

You can [download Linux games](https://itsfoss.com/download-linux-games/) from various sources and also explore some of the [best distributions tailored for gaming](https://itsfoss.com/linux-gaming-distributions/) if that is what you want.

Moreover, you can also play some cool games on the terminal or the command line. Did you know that? 😲

**Linux has one added advantage over its Windows counterpart**. The mighty Linux terminal allows you to do many interesting, powerful, and useful things, including playing **command line games**.

Games that run on the terminal are light, fast, and fun to play.

And the best thing of all, you’ve got a lot of classic retro games available for the Linux terminal.

## 1. Bastet

Who hasn’t spent hours together playing [Tetris](https://en.wikipedia.org/wiki/Tetris?ref=itsfoss.com)? Simple, but totally addictive.

Bastet is the Tetris of Linux. You can play the normal version or choose the harder version to challenge yourself.

Use the command below to **install Bastet**:

`sudo apt install bastet`


**To play the game**, run the below command in the terminal:

`bastet`


Use the spacebar to rotate the bricks and arrow keys to guide. You can also customize the keys as per your preferences.

## 2. Ninvaders

![Playing Ninvaders](https://itsfoss.com/content/images/2023/04/ninvaderss.gif)

Space Invaders on a command-line interface. I remember tussling for a high score with my brother on this. One of the best arcade games out there.

Copy and paste the command to install Ninvaders.

`sudo apt install ninvaders`


To play this game, use the command below:

`ninvaders`


Arrow keys to move the spaceship. Space bar to shoot at the aliens.

## 3. Pacman4console

![Playing Pacman4Console](https://itsfoss.com/content/images/2023/04/pacmancon.gif)

Yes, the King of the arcade. Right?

Pacman4console is the terminal version of the popular arcade hit **Pacman**. ⍩⃝

Use the command to get pacman4console:

`sudo apt install pacman4console`


Open a terminal, and I suggest you maximize it. Type the command below to launch the game:

`pacman4console`


Use the arrow keys to control the movement.

## 4. nSnake

![Playing nSnake](https://itsfoss.com/content/images/2023/04/nsnake.gif)

Remember the snake game on Nokia phones? 🐍

That game kept me hooked on the phone for a long time. I used to devise various coiling patterns to manage the grown-up snake.

We have the snake game in Linux terminal thanks to nSnake. Use the command below to install it:

`sudo apt install nsnake`


To play the game, type in the below command to launch the game.

`nsnake`


Use arrow keys to move the snake and feed it. You can also download various levels by following the instructions in the game.

**Suggested Read 📖**

[Best Games On Steam You Can Play On Linux and WindowsHere’s a curated list of the best steam games in various genres. The games listed here are available on both Windows and Linux. When it comes to gaming, a system running on a Windows platform is what anyone would recommend. It still is an excellent choice for gamers with](https://itsfoss.com/best-linux-games-steam/)![](https://itsfoss.com/content/images/wordpress/2017/12/best-steam-games.png)


![](https://itsfoss.com/content/images/wordpress/2017/12/best-steam-games.png)

## 5. Greed

Greed is a little like Tron, minus the speed and adrenaline.

Your location is denoted by a blinking ‘@’. You are surrounded by numbers, and you can choose to move in any of the 4 directions,

![Playing Greed](https://itsfoss.com/content/images/2023/04/greed.gif)

The direction you choose has a number, and you move precisely that number of steps. And you repeat the step again. You cannot revisit the visited spot, and the game ends when you cannot make a move.

It may look confusing, so I would say it may not be to everyone's liking. It is still fun.

Install greed with the command below:

`sudo apt install greed`


To launch the game, use the command below. Then use the arrow keys to play the game.

`greed`


## 6. Air Traffic Controller

What’s better than being a pilot? An air traffic controller **✈️**

You can simulate an entire air traffic system in your terminal. To be honest, managing air traffic from a terminal kind of feels, real and sounds cool. (what do you think?)

![Air Traffic Controller](https://itsfoss.com/content/images/2023/04/atc.png)

It is one of the games that come included with **BSD Games package**. You can explore the other free and open-source games included with it as well.

Install the game using the command below:

`sudo apt install bsdgames`


First, you need to read the instructions to play the game, to do that use the command:

`man atc`


Once you understand how it is done, enter the command below to launch the game:

`atc`


**Suggested Read 📖**

[Play Multiplayer Tron Arcade Game In Linux TerminalWhen it comes to gaming in Linux, Linux has an added advantage of terminal games. These ‘terminal games’ are played in the Linux command line terminal. Unlike the usual games, terminal games are mostly in ASCII display. ASCII might not sound fancy, and it isn’t. But you can still](https://itsfoss.com/play-tron-game-linux-terminal/)![](https://itsfoss.com/content/images/wordpress/2016/03/ssh-tron.gif)


![](https://itsfoss.com/content/images/wordpress/2016/03/ssh-tron.gif)

## 7. Backgammon

![Backgammon](https://itsfoss.com/content/images/2023/04/backgammon.png)

Whether you have played [Backgammon](https://en.wikipedia.org/wiki/Backgammon?ref=itsfoss.com) before or not, You should check this out. The instructions will be prompted when you launch the game. Play it against the computer or your friend if you prefer.

It is a two-player board game. This one is also included with the **same BSD Games package** as mentioned above.

Install Backgammon using this command:

`sudo apt install bsdgames`


Type in the below command to launch the game:

`backgammon`


## 8. Moon Buggy

Jump. Fire. Hours of fun. No more words to describe it. Lots of fun! 🚗

![Playing Moon Buggy](https://itsfoss.com/content/images/2023/04/moon.gif)

Install the game using the command below:

`sudo apt install moon-buggy`


Use the below command to start the game:

`moon-buggy`


Press **space** to jump, ‘**a**’ or ‘**l**’ to shoot.

## 9. 2048

Here’s something to make your brain flex 🧠

[2048](https://itsfoss.com/2048-game/) is a strategic as well as highly addictive game. The goal is to get a score of 2048.

![Playing 2048](https://itsfoss.com/content/images/2023/04/2048.gif)

You need to install an addition **gcc** package to build the game from source.

`sudo apt install gcc`


Head to its [GitHub page](https://github.com/mevdschee/2048.c?ref=itsfoss.com) if you are curious.

Copy and paste the commands below one by one to install the game.

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


Type the below command to launch the game and use the arrow keys to play.

`./2048`


## 10. Nudoku

Want to play Sudoku on the Linux terminal? Why not.

You can install it using the following command:

`sudo apt install nudoku`


To run the game, simply type:

`nudoku`


## Your pick?

If you want to have fun with the Linux terminal, these games should give you a good experience. I guess it is time to press Ctrl+Alt+T now that you've read this.

You may also check out our list of the best ASCII games for Linux:

[Best ASCII Games for Linux That are Insanely GoodText-based or should I say terminal-based games were very popular a decade back – when you didn’t have visual masterpieces like God Of War, Red Dead Redemption 2 or Spiderman. Of course, the Linux platform has its share of good games – but not always the “latest and greatest”. But, there](https://itsfoss.com/best-ascii-games/)![](https://itsfoss.com/content/images/wordpress/2018/11/best-ascii-games-featured.png)


![](https://itsfoss.com/content/images/wordpress/2018/11/best-ascii-games-featured.png)

If you like ASCII art, here are some fun CLI tools to explore.

[10 Tools to Generate and Have Fun With ASCII Art in Linux TerminalLinux terminal is not as scary as you think. Of course, it could be intimidating in the beginning but once you know the terminal better, you start loving it. You are likely to use the terminal for serious work. But there are many fun stuff you can do in the](https://itsfoss.com/ascii-art-linux-terminal/)![](https://itsfoss.com/content/images/wordpress/2022/07/ascii-art-tools-linux.png)


![](https://itsfoss.com/content/images/wordpress/2022/07/ascii-art-tools-linux.png)

Or, perhaps you'll run a train in the terminal?

[Running a Train in the Linux Terminal With sl CommandChoo choo! All aboard the choo choo train in the Linux terminal.](https://itsfoss.com/ubuntu-terminal-train/)![](https://itsfoss.com/content/images/wordpress/2015/04/Linux_Terminal_Train.jpeg)


![](https://itsfoss.com/content/images/wordpress/2015/04/Linux_Terminal_Train.jpeg)

💬 What* is your favorite on the list? Or got some other fun stuff for the terminal? Do share your thoughts in the comments below.*