28

7个让你微笑的终端命令

 3 years ago
source link: http://developer.51cto.com/art/202006/619345.htm
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Shell命令是用于提高开发人员生产效率的强大工具。还有一些非常有趣的命令工具,使你在经过一整天的工作后会微笑。

你可以在终端上玩文字游戏,创建精美的ASCII图片,等等。我们来看一下。

nIrEfya.jpg!web

1. sl

这不是错字,该命令确实是 sl。

$ sudo apt-get install sl  # Linux 
$ brew install sl          # MacOs 

如果你运行它,将会看到火车从右到左,结果看起来像这样:

4e06e1b827536a67e973c1a40f19d1e8.gif

2. fortune

$ sudo apt-get install fortune  # Linux 
$ brew install fortune          # MacOs 

fortune 将在终端上显示报价,有趣的预测,笑话甚至诗歌。

z2aArav.jpg!web

3. cowsay

$ sudo apt-get install cowsay  # Linux 
$ brew install cowsay          # MacOs 
$ cowsay hello 

cowsay 将显示一头母牛,其中包含你输入的单词作为参数。

MvMbe2f.jpg!web

通过管道与 fortune 结合起来,更有意思。

jYrQZ3b.jpg!web

4. toilet

toilet 可用于通过你的输入制作漂亮的ASCII图片,各种颜色均可用。

6Fny2mJ.jpg!web

5. oneko

oneko 是这个列表中我最喜欢的命令,该程序会显示出追逐你的鼠标光标的猫咪,就像这段视频中看到的那样。我找不到适用于macOS的版本。

$ sudo apt-get install oneko  # Linux 

6. xeyes

这是一款自带x11-app包的应用。它也不仅仅是为了好玩。如果你有一个大屏幕和小光标,它也是一个有用的工具。

$ sudo apt-get install x11-apps  # Linux 
$ xeyes 

FNnyuy6.gif

7. cmatrix

cmatrix 在终端上显示飞行文本,就像在《黑客帝国》中看到的一样!源代码可在GitHub上获得。

ABrmEbZ.gif

祝你编码愉快!


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK