设为首页 收藏本站
查看: 804|回复: 0

[经验分享] 20 Funny Commands of Linux or Linux is Fun in Terminal

[复制链接]

尚未签到

发表于 2018-5-24 12:15:13 | 显示全部楼层 |阅读模式
  原文链接
  http://www.tecmint.com/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.

DSC0000.png
  

20 Linux Funny Commands

1. Command: sl (Steam Locomotive)
  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“.
Install 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 DSC0001.png
  

sl command

  This command works even when you type ‘LS‘ and not ‘ls‘.
2. Command: 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.
root@tecmint:~# telnet towel.blinkenlights.nl DSC0002.png
  

telnet command

3. Command: fortune
  what about getting your random fortune, sometimes funny in terminal.
Install fortune
root@tecmint:~# apt-get install fortune (for aptitude based system)
root@tecmint:~# yum install fortune (for yum based system)root@tecmint:~# fortune
You're not my type.  For that matter, you're not even my species!!!
Future looks spotty.  You will spill soup in late evening.
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)
  It reverse every string given to it, is not it funny.
root@tecmint:~# rev
123abc
cba321
xuniL eb ot nrob
born to be Linux5. Command: factor
  Time for some Mathematics, this command output all the possible factors of a given number.
root@tecmint:~# factor
5
5: 5
12
12: 2 2 3
1001
1001: 7 11 13
5442134
5442134: 2 27210676. Command: 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
1—1=1
2—1=22—2=4
3—1=33—2=63—3=9
4—1=44—2=84—3=124—4=16
5—1=55—2=105—3=155—4=205—5=25
6—1=66—2=126—3=186—4=246—5=306—6=36
7—1=77—2=147—3=217—4=287—5=357—6=427—7=49
8—1=88—2=168—3=248—4=328—5=408—6=488—7=568—8=64
9—1=99—2=189—3=279—4=369—5=459—6=549—7=639—8=729—9=81
10—1=1010—2=2010—3=3010—4=4010—5=5010—6=6010—7=7010—8=8010—9=9010—10=100
11—1=1111—2=2211—3=3311—4=4411—5=5511—6=6611—7=7711—8=8811—9=9911—10=11011—11=121
12—1=1212—2=2412—3=3612—4=4812—5=6012—6=7212—7=8412—8=9612—9=10812—10=12012—11=13212—12=1447. Command: Cowsay
  An ASCII cow in terminal that will say what ever you want.
Install 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
____________
< I Love nix >
------------
\   ^__^
\  (oo)\_______
(__)\       )\/\
||----w |
||     ||  How about pipelineing ‘fortune command‘, described above with cowsay?
root@tecmint:~# fortune | cowsay
_________________________________________
/ Q: How many Oregonians does it take to  \
| screw in a light bulb? A: Three. One to |
| screw in the light bulb and two to fend |
| off all those                           |
|                                         |
| Californians trying to share the        |
\ experience.                             /
-----------------------------------------
\   ^__^
\  (oo)\_______
(__)\       )\/\
||----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.
apt-get insatll xcowsay
yum install xcowsayOutput
root@tecmint:~# xcowsay I Love nix DSC0003.png
  

xcowsay command

  cowthink is another command just run “cowthink Linux is sooo funny” and see the difference in output of cowsay and cowthink.
apt-get insatll cowthink
yum install cowthinkOutput
root@tecmint:~# cowthink ....Linux is sooo funny
_________________________
( ....Linux is sooo funny )
-------------------------
o   ^__^
o  (oo)\_______
(__)\       )\/\
||----w |
||     ||8. Command: 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.
root@tecmint:~# yes I Love Linux
I Love Linux
I Love Linux
I Love Linux
I Love Linux
I Love Linux
I Love Linux
I Love Linux
I Love Linux
I Love Linux
I Love Linux
I Love Linux
I Love Linux  Note: (Till you interrupt i.e ctrl+c).
9. Command: 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
root@tecmint:~# apt-get install toilet
root@tecmint:~# yum install toiletOutput
root@tecmint:~# toilet tecmint
mmmmmmm                        "             m                              
#     mmm    mmm   mmmmm  mmm    m mm   mm#mm          mmm    mmm   mmmmm
#    #"  #  #"  "  # # #    #    #"  #    #           #"  "  #" "#  # # #
#    #""""  #      # # #    #    #   #    #           #      #   #  # # #
#    "#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 DSC0004.png
  

toilet command

  Note: Figlet is another command that more or less provide such kind of effect in terminal.
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.
Install cmatrix
root@tecmint:~# apt-get install cmatrix
root@tecmint:~# yum install cmatrixOutput
root@tecmint:~# cmatrix DSC0005.png
  

cmatrix command

11. Command: 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
root@tecmint:~# apt-get install oneko
root@tecmint:~# yum install onekoOutput
root@tecmint:~# oneko DSC0006.png
  

oneko command

  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
  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).
root@tecmint:~# :(){ :|:& }:
13. Command: 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.
root@tecmint:~# while true; do echo "$(date '+%D %T' | toilet -f term -F border --gay)"; sleep 1; done DSC0007.png
  

Linux while command

  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; done14. Command: 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
root@tecmint:~# apt-get install espeak
root@tecmint:~# yum install espeakOutput
root@tecmint:~# espeak "Tecmint is a very good website dedicated to Foss Community"15. Command: 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.
Install aafire
root@tecmint:~# apt-get install libaa-binOutput
root@tecmint:~# aafire DSC0008.png
  

aafire command

16. Command: bb
  First install “apt-get insatll bb” and then, type “bb” in terminal and see what happens.
root@tecmint:~# bb DSC0009.png
  

bb command

17. Command: 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“.
root@tecmint:~# url -u YourUsername:YourPassword -d status="Your status message" http://twitter.com/statuses/update.xml18. ASCIIquarium
  How it will be to get an aquarium in terminal.
root@tecmint:~# apt-get install libcurses-perl
root@tecmint:~# cd /tmp
root@tecmint:~# wget http://search.cpan.org/CPAN/authors/id/K/KB/KBAUCOM/Term-Animation-2.4.tar.gz
root@tecmint:~# tar -zxvf Term-Animation-2.4.tar.gz
root@tecmint:~# cd Term-Animation-2.4/
root@tecmint:~# perl Makefile.PL &&  make &&   make test
root@tecmint:~# make installInstall ASCIIquarium
  Now Download and Install ASCIIquarium.
root@tecmint:~# cd /tmp
root@tecmint:~# wget http://www.robobunny.com/projects/asciiquarium/asciiquarium.tar.gz
root@tecmint:~# tar -zxvf asciiquarium.tar.gz
root@tecmint:~# cd asciiquarium_1.1/
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.
root@tecmint:~# asciiquarium DSC00010.png
  

aquarium command

19. Command: funny manpages
  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
condom
date
echo
flame
flog
gong
grope, egrope, fgrope
party
rescrog
rm
rtfm
tm
uubp
woman (undocumented)
xkill
xlart
sex
strfryroot@tecmint:~# man baby20. Linux Tweaks
  It is time for you to have some one liner tweaks.
root@tecmint:~# world
bash: world: not foundroot@tecmint:~# touch girls\ boo**
touch: cannot touch `girls boo**': Permission deniedroot@tecmint:~# nice man woman
No manual entry for womanroot@tecmint:~# ^How did the sex change operation go?^
bash: :s^How did the sex change operation go?^ : substitution failedroot@tecmint:~# %blow
bash: fg: %blow: no such jobroot@tecmint:~# make love
make: *** No rule to make target `love'.  Stop.$ [ whereis my brain?                    
sh: 2: [: missing ]% man: why did you get a divorce?
man:: Too many arguments.% !:say, what is saccharine?
Bad substitute.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.
  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.
  

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-480653-1-1.html 上篇帖子: Linux SSH Publickey 下篇帖子: Linux 下建立ftp
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表