mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-02-25 00:50:15 +08:00
Merge pull request #804 from Linchenguang/master
【翻译完成】20 Funny Commands of Linux or Linux is Fun in Terminal
This commit is contained in:
commit
02c1e0a426
@ -1,41 +1,41 @@
|
||||
>>**Linchenguang翻译中**
|
||||
Linux命令及Linux终端的20个趣事
|
||||
|
||||
20 Funny Commands of Linux or Linux is Fun in Terminal
|
||||
================================================================================
|
||||
**Linux** is fun! **Huhhh**. OK so you don’t believe me. Mind me at the end of this article you will have to believe that **Linux** is actually a fun box.
|
||||
玩**Linux** 乐趣无穷!**哈哈**。不相信。记住我的话,在文章结尾时你就会相信**Linux**确实好玩了。
|
||||
|
||||
|
||||

|
||||
|
||||
### 1. Command: sl (Steam Locomotive) ###
|
||||
### 1. 命令:sl (蒸汽机车) ###
|
||||
|
||||
You might be aware of command ‘ls‘ the list command and use it frequently to view the contents of a folder but because of miss-typing sometimes you would result in ‘sl‘, how about getting a little fun in terminal and not “command not found“.
|
||||
你可能了解 ‘ls’ 命令,并经常使用它来查看文件夹的内容。但是,有些时候你可能会拼写成 ‘sl’ ,这时我们应该如何获得一些乐趣而不是看见“command not found”呢?
|
||||
|
||||
#### Install sl ####
|
||||
#### 安装 sl ####
|
||||
|
||||
root@tecmint:~# apt-get install sl (In Debian like OS)
|
||||
root@tecmint:~# yum -y install sl (In Red Hat like OS)
|
||||
|
||||
#### Output ####
|
||||
#### 输出 ####
|
||||
|
||||
root@tecmint:~# sl
|
||||
|
||||

|
||||
|
||||
This command works even when you type ‘**LS**‘ and not ‘**ls**‘.
|
||||
当你敲入的是‘**LS**‘而不是’**ls**‘时,这个命令也会运行。
|
||||
|
||||
### 2. Command: telnet ###
|
||||
### 2. 命令:telnet ###
|
||||
|
||||
**No! No!!** it is not as much complex as it seems. You would be familiar with **telnet**. Telnet is a text-oriented bidirectional network protocol over network. Here is nothing to be installed. What you should have is a Linux box and a working Internet.
|
||||
**非也!非也!!**这可不像它平常那样复杂。你可能很熟悉**telnet**。Telnet 是一个文本化的双向网络协议。这里不需要安装什么东西。你需要的就是一个Linux系统和一个正常的网络。
|
||||
|
||||
root@tecmint:~# telnet towel.blinkenlights.nl
|
||||
|
||||

|
||||
|
||||
#### 3. Command: fortune ####
|
||||
#### 3. 命令:fortune ####
|
||||
|
||||
what about getting your random fortune, sometimes funny in terminal.
|
||||
试试你未知的运气,终端里有时也有好玩的。
|
||||
|
||||
#### Install fortune ####
|
||||
#### 安装 fortune ####
|
||||
|
||||
root@tecmint:~# apt-get install fortune (for aptitude based system)
|
||||
root@tecmint:~# yum install fortune (for yum based system)
|
||||
@ -47,9 +47,9 @@ what about getting your random fortune, sometimes funny in terminal.
|
||||
You worry too much about your job. Stop it. You are not paid enough to worry.
|
||||
Your love life will be... interesting.
|
||||
|
||||
### 4. Command: rev (Reverse) ###
|
||||
### 4. 命令:rev(翻转)###
|
||||
|
||||
It **reverse** every string given to it, is not it funny.
|
||||
它会把传递给它的的每个字符串都反过来,是不是很好玩。
|
||||
|
||||
root@tecmint:~# rev
|
||||
|
||||
@ -59,9 +59,9 @@ It **reverse** every string given to it, is not it funny.
|
||||
xuniL eb ot nrob
|
||||
born to be Linux
|
||||
|
||||
### 5. Command: factor ###
|
||||
### 5. 命令:factor ###
|
||||
|
||||
Time for some **Mathematics**, this command output all the possible factors of a given number.
|
||||
该谈点儿关于**Mathematics**的了,这个命令输出给定数字的所有因子。
|
||||
|
||||
root@tecmint:~# factor
|
||||
|
||||
@ -77,9 +77,9 @@ Time for some **Mathematics**, this command output all the possible factors of a
|
||||
5442134
|
||||
5442134: 2 2721067
|
||||
|
||||
### 6. Command: script ###
|
||||
### 6.命令:script ###
|
||||
|
||||
OK fine this is not a command and a script but it is nice.
|
||||
好的,这不是什么命令,而是一个脚本,一个很有趣的脚本。
|
||||
|
||||
root@tecmint:~# for i in {1..12}; do for j in $(seq 1 $i); do echo -ne $i×$j=$((i*j))\\t;done; echo;done
|
||||
|
||||
@ -96,16 +96,16 @@ OK fine this is not a command and a script but it is nice.
|
||||
11×1=11 11×2=22 11×3=33 11×4=44 11×5=55 11×6=66 11×7=77 11×8=88 11×9=99 11×10=110 11×11=121
|
||||
12×1=12 12×2=24 12×3=36 12×4=48 12×5=60 12×6=72 12×7=84 12×8=96 12×9=108 12×10=120 12×11=132 12×12=144
|
||||
|
||||
### 7. Command: Cowsay ###
|
||||
### 7.命令:Cowsay ###
|
||||
|
||||
An **ASCII** cow in terminal that will say what ever you want.
|
||||
一个在终端用**ASCII**码组成的小牛,这个小牛会说出你想要它说的话。
|
||||
|
||||
#### Install Cowsay ####
|
||||
### 安装Cowsay ###
|
||||
|
||||
root@tecmint:~# apt-get install cowsay (for Debian based OS)
|
||||
root@tecmint:~# yum install cowsay (for Red Hat based OS)
|
||||
|
||||
#### Output ####
|
||||
### 输出 ###
|
||||
|
||||
root@tecmint:~# cowsay I Love nix
|
||||
|
||||
@ -118,7 +118,8 @@ An **ASCII** cow in terminal that will say what ever you want.
|
||||
||----w |
|
||||
|| ||
|
||||
|
||||
How about pipelineing ‘**fortune command**‘, described above with cowsay?
|
||||
|
||||
如果用管道将‘**fortune command**’命令重定向到cowsay会怎样呢?
|
||||
|
||||
root@tecmint:~# fortune | cowsay
|
||||
|
||||
@ -137,25 +138,25 @@ root@tecmint:~# fortune | cowsay
|
||||
||----w |
|
||||
|| ||
|
||||
|
||||
**Note: ‘|‘** is called pipeline instruction and it is used where the output of one command needs to be the input of another command. In the above example the output of ‘**fortune**‘ command acts as an input of ‘**cowsay**‘ command. This pipeline instruction is frequently used in scripting and programming.
|
||||
|
||||
**xcowsay** is a graphical program which response similar to **cowsay** but in a graphical manner, hence it is **X** of cowsay.
|
||||
**提示:‘|’**是管道命令符。通常它是将一个命令的输出作为下一个命令的输入。在上面的例子中‘**fortune**’的输出作为‘**cowsay**’命令的输出。管道命令会经常用在脚本和程序编写中。
|
||||
|
||||
**xcowsay**是一个图形界面程序。它与**cowsay**类似只是以一种图形的方式来表达,可以说是**X**版本的cowsay。
|
||||
|
||||
apt-get insatll xcowsay
|
||||
yum install xcowsay
|
||||
|
||||
#### Output ####
|
||||
|
||||
#### 输出 ####
|
||||
root@tecmint:~# xcowsay I Love nix
|
||||
|
||||

|
||||
|
||||
**cowthink** is another command just run “cowthink Linux is sooo funny” and see the difference in output of cowsay and cowthink.
|
||||
**cowthink**是另一个命令。运行“cowthink Linux is sooo funny ”看看它与cowsay的不同吧。
|
||||
|
||||
apt-get insatll cowthink
|
||||
yum install cowthink
|
||||
|
||||
#### Output ####
|
||||
#### 输出 ####
|
||||
|
||||
root@tecmint:~# cowthink ....Linux is sooo funny
|
||||
_________________________
|
||||
@ -167,9 +168,9 @@ root@tecmint:~# fortune | cowsay
|
||||
||----w |
|
||||
|| ||
|
||||
|
||||
### 8. Command: yes ###
|
||||
### 8. 命令:yes ###
|
||||
|
||||
It is funny but useful as well, specially in scripts and for **System Administrators** where an automated predefined response can be passed to terminal or generated.
|
||||
yes 是一个非常有趣又有用的命令,尤其对于脚本编写和系统管理员来说,它可以自动地生成预先定义的响应或者将其传到终端。
|
||||
|
||||
root@tecmint:~# yes I Love Linux
|
||||
|
||||
@ -186,18 +187,19 @@ It is funny but useful as well, specially in scripts and for **System Administra
|
||||
I Love Linux
|
||||
I Love Linux
|
||||
|
||||
**Note**: (Till you interrupt i.e **ctrl+c**).
|
||||
**提示**: (直到你按下**ctrl+c**才停止)
|
||||
|
||||
### 9. Command: toilet ###
|
||||
### 9. 命令: toilet ###
|
||||
|
||||
what? Are u kidding, huhh no! Definitely not, but for sure this command name itself is too funny, and I don’t know from where this command gets it’s name.
|
||||
|
||||
#### Install toilet ####
|
||||
什么?你在开玩笑吗! 当然没有,但肯定的是这个命令的名字太搞了,我也不知道这个命令的名字从何而来。
|
||||
|
||||
#### 安装toilet ####
|
||||
|
||||
root@tecmint:~# apt-get install toilet
|
||||
root@tecmint:~# yum install toilet
|
||||
|
||||
#### Output ####
|
||||
#### 输出 ####
|
||||
|
||||
root@tecmint:~# toilet tecmint
|
||||
|
||||
@ -207,106 +209,115 @@ what? Are u kidding, huhh no! Definitely not, but for sure this command name its
|
||||
# #"""" # # # # # # # # # # # # # #
|
||||
# "#mm" "#mm" # # # mm#mm # # "mm # "#mm" "#m#" # # #
|
||||
|
||||
It even offers some kind of color and fonts style.
|
||||
|
||||
这个命令甚至提供了一些颜色和字体格式。
|
||||
|
||||
root@tecmint:~# toilet -f mono12 -F metal Tecmint.com
|
||||
|
||||

|
||||
|
||||
**Note: Figlet** is another command that more or less provide such kind of effect in terminal.
|
||||
**提示:Figlet** 是另外一个与toilet产生的效果类似的命令。
|
||||
|
||||
### 10. Command: cmatrix ###
|
||||
|
||||
You might have seen Hollywood movie ‘**matrix**‘ and would be fascinated with power, **Neo** was provided with, to see anything and everything in matrix or you might think of an animation that looks alike **Hacker**‘s desktop.
|
||||
### 10. 命令:cmatrix ###
|
||||
|
||||
#### Install cmatrix ####
|
||||
你可能看多好莱坞的电影‘**黑客帝国**’并陶醉于被赋予**Neo**的能看到在矩阵中任何事物的能力,或者你会想到一幅类似于‘**Hacker**’的桌面的生动画面。
|
||||
|
||||
|
||||
#### 安装 cmatrix ####
|
||||
|
||||
root@tecmint:~# apt-get install cmatrix
|
||||
root@tecmint:~# yum install cmatrix
|
||||
|
||||
#### Output ####
|
||||
#### 输出 ####
|
||||
|
||||
root@tecmint:~# cmatrix
|
||||
|
||||

|
||||
|
||||
### 11. Command: oneko ###
|
||||
### 11. 命令: oneko ###
|
||||
|
||||
OK so you believe that mouse pointer of Linux is the same silly black/white pointer where no animation lies then I fear you could be wrong. “**oneko**“ is a package that will attach a “**Jerry**“ with you mouse pointer and moves along with you pointer.
|
||||
|
||||
#### Install cmatrix ####
|
||||
可能你坚信Linux的鼠标指针永远是同样的黑色或白色一点儿也不生动,那你就错了。“**oneko**”是一个会让一个“**Jerry**”你的鼠标指针附着到你鼠标上的一个软件包。
|
||||
|
||||
#### 安装 oneko ####
|
||||
|
||||
root@tecmint:~# apt-get install oneko
|
||||
root@tecmint:~# yum install oneko
|
||||
|
||||
#### Output ####
|
||||
#### 输出 ####
|
||||
|
||||
root@tecmint:~# oneko
|
||||
|
||||

|
||||
|
||||
**Note**: Once you close the terminal from which **oneko** was run, **jerry** will disappear, nor will start at start-up. You can add the application to start up and continue enjoying.
|
||||
|
||||
### 12. Fork Bomb ###
|
||||
**提示**:关闭运行着**oneko**的终端时,**Jerry**也会随之消失,重新启动终端时也不会再出项。你可以将这个程序添加到启动选项中然后继续使用它。
|
||||
|
||||
This is a very nasty piece of code. Run this at **your own risk**. This actually is a fork bomb which exponentially multiplies itself till all the system resource is utilized and the system hangs. (To check the power of above code you should try it once, but all at your own risk, close and save all other programs and file before running **fork bomb**).
|
||||
### 12. Fork炸弹 ###
|
||||
|
||||
这是一段非常欠抽的代码。运行这个命令的后果自己负责。这个命令其实是一个fork炸弹,它会以指数倍的自乘,直到所有的系统资源都被利用了或者系统挂起(想要见识这个命令的威力你可以试一次这个命令,但是后果自负,记得在运行它之前关掉并保存其它所有程序和文件)。
|
||||
|
||||
root@tecmint:~# :(){ :|:& }:
|
||||
|
||||
### 13. Command: while ###
|
||||
### 13. 命令:while ###
|
||||
|
||||
The below “while” command is a script which provides you with colored date and file till you interrupt (ctrl + c). Just copy and paste the below code in terminal.
|
||||
|
||||
下面的”while“命令是一个脚本,这个脚本可以为你提供彩色的日期和文件直到你按下中断键(ctrl+c)。复制粘贴这个命令到你的终端。
|
||||
|
||||
root@tecmint:~# while true; do echo "$(date '+%D %T' | toilet -f term -F border --gay)"; sleep 1; done
|
||||
|
||||

|
||||
|
||||
**Note**: The above script when modified with following command, will gives similar output but with a little difference, check it in your terminal.
|
||||
|
||||
**提示**:以上脚本通过下面的修改也会产生类似的输出但是还是有点不同的,在你的终端试试吧。
|
||||
|
||||
root@tecmint:~# while true; do clear; echo "$(date '+%D %T' | toilet -f term -F border --gay)"; sleep 1; done
|
||||
|
||||
### 14. Command: espeak ###
|
||||
### 14. 命令: espeak ###
|
||||
|
||||
Just Turn the Knob of your multimedia speaker to full before pasting this command in your terminal and let us know how you felt listening the god’s voice.
|
||||
将你的多媒体音箱的音量调到最大,然后在将这个命令复制到你的终端,来看看你听到上帝的声音时的反应吧。
|
||||
|
||||
#### Install espeak ####
|
||||
#### 安装 espeak ####
|
||||
|
||||
root@tecmint:~# apt-get install espeak
|
||||
root@tecmint:~# yum install espeak
|
||||
|
||||
#### Output ####
|
||||
#### 输出 ####
|
||||
|
||||
root@tecmint:~# espeak "Tecmint is a very good website dedicated to Foss Community"
|
||||
|
||||
### 15. Command: aafire ###
|
||||
### 15. 命令: aafire ###
|
||||
|
||||
How about fire in your terminal. Just type “**aafire**” in the terminal, without quotes and see the magic. Press any key to interrupt the program.
|
||||
在你的终端放一把火如何。把这个“**aafire**”敲到你的终端,不需要什么引号看看这神奇的一幕吧。按下任意键中指该程序。
|
||||
|
||||
#### Install aafire ####
|
||||
|
||||
#### 安装 aafire ####
|
||||
|
||||
root@tecmint:~# apt-get install libaa-bin
|
||||
|
||||
#### Output ####
|
||||
#### 输出 ####
|
||||
|
||||
root@tecmint:~# aafire
|
||||
|
||||

|
||||
|
||||
### 16. Command: bb ###
|
||||
### 16. 命令: bb ###
|
||||
|
||||
First install “**apt-get insatll bb**” and then, type “**bb**” in terminal and see what happens.
|
||||
首先安装“**apt-get install bb**”,然后敲入“**bb**”看看会发生什么吧。
|
||||
|
||||
root@tecmint:~# bb
|
||||
|
||||

|
||||
|
||||
### 17. Command: url ###
|
||||
### 17. 命令: url ###
|
||||
|
||||
Won’t it be an awesome feeling for you if you can update you **twitter status** from command line in front of your friend and they seems impressed. OK just replace **username, password** and **your status message** with your’s **username, password** and “**your status message**“.
|
||||
|
||||
如果在你的朋友面前用命令行来改变你的 **twitter status** 会不会很酷呢。用你的**用户名密码**和**你想要的状态**分别替换**username, password** 和“**your status message**“就可以了。
|
||||
|
||||
### 18. ASCIIquarium ###
|
||||
|
||||
How it will be to get an **aquarium** in terminal.
|
||||
想要在终端弄一个水族馆该,怎么办?
|
||||
|
||||
root@tecmint:~# apt-get install libcurses-perl
|
||||
root@tecmint:~# cd /tmp
|
||||
@ -316,9 +327,9 @@ How it will be to get an **aquarium** in terminal.
|
||||
root@tecmint:~# perl Makefile.PL && make && make test
|
||||
root@tecmint:~# make install
|
||||
|
||||
#### Install ASCIIquarium ####
|
||||
#### 安装 ASCIIquarium ####
|
||||
|
||||
Now Download and Install **ASCIIquarium**.
|
||||
下载并安装**ASCIIquarium**。
|
||||
|
||||
root@tecmint:~# cd /tmp
|
||||
root@tecmint:~# wget http://www.robobunny.com/projects/asciiquarium/asciiquarium.tar.gz
|
||||
@ -327,15 +338,19 @@ Now Download and Install **ASCIIquarium**.
|
||||
root@tecmint:~# cp asciiquarium /usr/local/bin
|
||||
root@tecmint:~# chmod 0755 /usr/local/bin/asciiquarium
|
||||
|
||||
And finally run “**asciiquarium**” or “**/usr/local/bin/asciiquarium**“ in terminal without quotes and be a part of magic that will be taking place in front of your eyes.
|
||||
|
||||
最后在终端运行“**asciiquarium**”或者“**/usr/local/bin/asciiquarium**”,记得不要加引号,神奇的一幕将在你眼前展现。
|
||||
|
||||
root@tecmint:~# asciiquarium
|
||||
|
||||

|
||||
|
||||
### 19. Command: funny manpages ###
|
||||
### 19. 命令: funny manpages ###
|
||||
|
||||
|
||||
首先安装“**apt-get install funny-manpages**”然后运行下面命令的man手册。其中一些
|
||||
|
||||
|
||||
First install “**apt-get install funny-manpages**” and then run man pages for the commands below. Some of them may be **18+**, run at your own risk, they all are too funny.
|
||||
|
||||
baby
|
||||
celibacy
|
||||
@ -362,7 +377,7 @@ First install “**apt-get install funny-manpages**” and then run man pages fo
|
||||
|
||||
### 20. Linux Tweaks ###
|
||||
|
||||
It is time for you to have some one liner **tweaks**.
|
||||
该到了做一些调整的时候了
|
||||
|
||||
root@tecmint:~# world
|
||||
|
||||
@ -400,16 +415,18 @@ It is time for you to have some one liner **tweaks**.
|
||||
server@localhost:/srv$ \(-
|
||||
bash: (-: command not found
|
||||
|
||||
Linux is sexy: **who | grep -i blonde | date; cd ~; unzip; touch; strip; finger; mount; gasp; yes; uptime; umount; sleep** (If you know what i mean)
|
||||
|
||||
There are certain other but these don’t work on all the system and hence not included in this article. Some of them are man **dog , filter, banner**, etc.
|
||||
Linux总是sexy:**who | grep -i blonde | date; cd ~; unzip; touch; strip; finger; mount; gasp; yes; uptime; umount; sleep**(如果你知道我的意思)
|
||||
|
||||
Have fun, you can say me thanks later :) yup your comment is highly appreciated which encourages us write more. Tell us which command you liked the most. Stay tuned i will be back soon with another article worth reading.
|
||||
|
||||
还有一些其它的命令,只是这些命令并不能在所有的系统上运行,所以本文没有涉及到。比如说**dog , filter, banner**
|
||||
|
||||
使用愉快,你可以稍后再对我说谢谢:)您的评价是我们前进的不竭动力。告诉我们你最喜欢的命令。继续关注,不久我会有另一篇值得阅读的文章。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.tecmint.com/20-funny-commands-of-linux-or-linux-is-fun-in-terminal/
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
译者:[Linchenguang](https://github.com/Linchenguang) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
Loading…
Reference in New Issue
Block a user