15 个有趣好玩的linux shell 命令

15 个有趣好玩的linux shell 命令
C
CSDN
04-09
今天介绍一些有趣的linux shell命令,所有的命令都可以使用man + 命令名称 来查看完整的使用方法。

1,figlet 字符画

figlet 可以将英文字符串以字符画的形式输出:

figlet hello

2,toilet 字符画

toilet 的功能跟figlet 类似,但输出的字符画的样子不一样,该命令还可以设置字体和颜色。

toilet hi # " # mm mmm #" # # # # # # # mm#mm

3,lolcat 字符画加彩色

lolcat 命令可以将figlet 或toilet 的输出加上颜色:

toilet hello| lolcat

输出如下:

4,aafire 火焰

aafire 命令输出由ASCII码组成的火焰状的字符,屏幕燃烧起来:

aafire

5,fortune 随机句子

fortune 命令随机输出名言或笑话:

fortune

Soap and education are not as sudden as a massacre, but they are more deadly in the long run.

– Mark Twain

fortune-zh 命令只输出中文:

fortune-zh

天下大势,分久必合,合久必分。

6,yes 重复输出一句话

yes 命令重复输出一句话:

yes hello,world

hello,world

hello,world

hello,world

7,pi 圆周率

pi 命令输出圆周率π,pi 数字 表示输出多少位的π:

pi 20

8,cal 日历

cal 命令可以显示日历:

cal --------------------

April 2020

Su Mo Tu We Th Fr Sa

9,sl 小火车

sl 命令输出一个小火车:

ls-h (中间没有空格)可以看到一个无穷尽的火车:

10,cowsay 会说话的牛

cowsay 命令是一只会说话的cow,它能输出很多种动物。

cowsay “我是一只小可爱~”< 我是一只小可爱~ > -----------------

\ __

cowsay -l 可以输出所有支持的小动物:

cowsay -l

Cow files in /usr/share/cowsay/cows:

apt bud-frogs bunny calvin cheese cock cower daemon default dragon

dragon-and-cow duck elephant elephant-in-snake eyes flaming-sheep

ghostbusters gnu hellokitty kiss koala kosh luke-koala mech-and-cow milk

moofasa moose pony pony-smaller ren sheep skeleton snowman stegosaurus

stimpy suse three-eyes turkey turtle tux unipony unipony-smaller vader

vader-koala www

使用-f 参数切换小动物:

cowsay -f duck “我是一只小鸭子” ________________ < 我是一只小鸭子 > ----------------

\

\

\ >_ () _

xcowsay 命令是图形化的cowsay。

11,cmatrix 黑客帝国

cmatrix 命令可以输出黑客帝国 的效果:

cmatrix 还有很多参数可以改变效果:

参数 含义
-a 异步滚动
-b 打开粗体字符
-B 所有字符为粗体
-o 使用旧式滚动模式
-C 切换颜色
12,asciiquarium 水族馆

asciiquarium 是一个水族馆,相信肯定会惊艳到你。其安装方法如下:

$ sudoapt-getinstall libcurses-perl

$ cd /tmp

$ wget --no-check-certificate http://search.cpan.org/CPAN/authors/id/K/KB/KBAUCOM/Term-Animation-2.4.tar.gz

$ tar -zxvf Term-Animation-2.4.tar.gz

$ cd Term-Animation-2.4/

$ perl Makefile.PL &&make&&maketest $ sudomakeinstall $ cd /tmp

$ wget --no-check-certificate http://www.robobunny.com/projects/asciiquarium/asciiquarium.tar.gz

$ tar -zxvf asciiquarium.tar.gz

$ cd asciiquarium_1.0/ # whatever the current version you got was $ sudocp asciiquarium /usr/local/bin

$ sudochmod 0755 /usr/local/bin/asciiquarium

安装成功后,执行asciiquarium 命令:

13,asciiview 图片转换字符画

asciiview 命令可以将任意图片转换成字符画的形式输出,安装方法如下:

sudoapt-getinstall aview imagemagick

asciiview hepburn.pen

转换一张赫本的图片,效果如下:

14,bastet 俄罗斯方块

这是一个命令行中的俄罗斯方块,可以使用方向键来控制:

15,ninvaders 太空入侵者

这是一个太空入侵者游戏,按方向键可以移动,空格可以发射子弹:

还有很多这样的命令行小游戏,这里不再一一演示,感兴趣的可以自己尝试一下:

命令 含义
pacman4console 吃豆人
nsnake 贪吃蛇
greed 赢者通吃
bsdgames 空中塔台控制
bsdgames 双陆棋
moonbuggy 月球车
2048 命令行版2048
(完。)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值