在命令行中步入黑客帝国
黑客帝国

> 
> 使用 cmatrix 重建每个人都喜欢的 20 世纪 90 年代科幻电影中滚动代码的经典外观。
> 
> 
> 


![](/data/attachment/album/201812/20/222508ds2z288zes8k28s7.png)


这是今天的命令行玩具日历推荐项目。如果这是你第一次访问该系列，你可能想知道什么是命令行玩具？它可以是在命令行中任何可以娱乐的东西，可以是一个游戏，一个有趣的工具，或者一个消遣的东西。


其中一些是经典，有些是全新的（至少对我而言），但我希望你们所有人都能在这个系列中找到你喜欢的东西。


在我们在接近下一年的时候，现在是回顾和期待的好时机。2019 年会为你带来什么？2019 年意味着什么？


我想起 2019 年将是我青少年时期最喜欢的科幻电影之一[黑客帝国](https://en.wikipedia.org/wiki/The_Matrix)的二十周年纪念日，它当时让我思考了未来将会发生什么。对于像我这样的痴迷计算机小孩来说，这是一个电脑程序员通过利用自己思维的力量崛起并成为虚拟宇宙中的动作英雄的终极故事。


当时，对我来说没有比这部电影更具未来感了。无论是故事本身，还是迷人的特效。即使意识到它是在二十多年前拍摄的也并没有改变我的想法。


今天将它带回我们的命令行玩具，让我们在终端用 `cmatrix` 重建黑客帝国中那向下滚动的代码流。 `cmatrix` 很容易安装，它在 Fedora 中被打包了，所以安装它只需：



```
$ dnf install cmatrix
```

接着，只需在你的终端输入 `cmatrix` 即可运行。


![](/data/attachment/album/201812/20/222534xb1r9md9mbrmuebh.gif)


你可以在 [GitHub](https://github.com/abishekvashok/cmatrix) 上找到使用 GPL 许可的 `cmatrix` 的源代码。


你有特别喜欢的命令行小玩具需要我介绍的吗？这个系列要介绍的小玩具大部分已经有了落实，但还预留了几个空位置。评论留言让我知道，我会查看的。如果还有空位置，我会考虑介绍它的。如果没有，但如果我得到了一些很好的意见，我会在最后做一些有价值的提及。


了解一下昨天的玩具，[在 Linux 中让 Bash 提示符变得像冬天](https://github.com/abishekvashok/cmatrix)，还有记得明天再来！




---


via: <https://opensource.com/article/18/12/linux-toy-cmatrix>


作者：[Jason Baker](https://opensource.com/users/jason-baker) 选题：[lujun9972](https://github.com/lujun9972) 译者：[geekpi](https://github.com/geekpi) 校对：[wxy](https://github.com/wxy)


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


OK
You've found your way to today's entry from the Linux command-line toys advent calendar. If this is your first visit to the series, you might be wondering what a command-line toy even is? It's anything that's an entertaining diversion at the terminal, be it a game, a fun utility, or a simple distraction.

Some of these are classics, and some are completely new (at least to me), but I hope all of you find something you enjoy in this series.

As we come to the close of another year, it's a good time for looking back, and looking forward. What will 2019 hold for you? What does it mean to be 2019?

I'm reminded that 2019 will mark the twentieth anniversary of one of my favorite science fiction movies from my teenage years, that at the time had me thinking a lot about what the future would hold: [The Matrix](https://en.wikipedia.org/wiki/The_Matrix). For a computer nerd kid like me, it was the ultimate story of a computer programmer rising up and becoming an action hero in a virtual universe by tapping into the power of his mind.

At the time, there was no movie that seemed more futuristic to me; both in the story itself, and in the mesmerizing special effects. Realizing that it was filmed over twenty years ago doesn't change that in my mind.

Bringing it back to our command-line toy for today, let's recreate the downward flowing code of the Matrix at our terminal with **cmatrix**. **cmatrix** was an easy install for me, packaged for Fedora, so installing it took simply:

`$ dnf install cmatrix`


Then, just type **cmatrix**** **at your terminal to run.

![Linux toy: cmatrix animated Linux toy: cmatrix animated](https://opensource.com/sites/default/files/uploads/linux-toy-cmatrix-animated.gif)

You can find the source code for** ****cmatrix** [on GitHub](https://github.com/abishekvashok/cmatrix) under a GPL license.

Do you have a favorite command-line toy that you think I ought to include? The calendar for this series is mostly filled out but I've got a few spots left. Let me know in the comments below, and I'll check it out. If there's space, I'll try to include it. If not, but I get some good submissions, I'll do a round-up of honorable mentions at the end.

Check out yesterday's toy, [Winterize your Bash prompt in Linux](https://opensource.com/article/18/12/linux-toy-bash-prompt), and check back tomorrow for another!

## 8 Comments