当前位置首页 > Linux知识

20个最受欢迎的Linux命令(转)

阅读次数:216 次  来源:admin  发布时间:

本文根据 commandlinefu 网站的历史排名,筛选出了前 20 个得票最高的 Linux 命令。看看你都能熟练使用了吗?

1、以 root 帐户执行上一条命令

udo !!

2、利用 Python 搭建一个简单的 Web 服务器,可通过http://$HOSTNAME:8000访问

ython -m SimpleHTTPServer

3、切换到上一次访问的目录

cd -

4、将上一条命令中的 foo 替换为 bar,并执行

^foo^bar

5、traceroute + ping

mtr google.com

6、快速调用一个编辑器来编写一个命令

ctrl-x e

7、执行一个命令,但不保存在命令历史记录中

lt;space>command

8、重新初始化终端

reset

9、调出上次命令使用的参数

'ALT+.' or '<ESC> .'

10、以更加清晰的方式显示当前系统挂载的文件系统

mount column -t

11、在给定的时间执行命令

echo "ls -l" at midnight

12、通过 DNS 控制台查询维基百科

dig +short txt <keyword>.wp.dg.cx

13、从 80 端口向你本地的 2001 端口开启隧道

h -N -L2001:localhost:80 somemachine

14、快速访问 ASCII 表

man ascii

15、获取你的外部 IP 地址

curl ifconfig.me

16、!! 表示重复执行上一条命令,并用 :gs/foo/bar 进行替换操作

!!:gs/foo/bar

17、输出你的麦克风到远程机器的扬声器

dd if=/dev/dsp ssh -c arcfour -C username@host dd of=/dev/d

18、挂载一个临时的内存分区

mount -t tmpfs tmpfs /mnt -o size=1024m

19、以 SSH 方式挂载目录/文件系统

hfs name@server:/path/to/folder /path/to/mount/point

20、通过 curl 更新 Twitter

curl -u user:pass -d status="Tweeting from the shell" <a href="http://twitter.com/statuses/update.xml">http://twitter.com/statuses/update.x

上一篇:Linux下MySQL5.6的修改字符集编码为UTF8
下一篇:【Linux】-rm命令