1、以root賬戶執行上一條命令
sudo !!
2、利用python搭建一個 簡單的web服務器,可通過http:$HOSTNAME:8000訪問
python -m SimpleHTTPServer
3、切換到上一次訪問的目錄
cd -
4、將上一條命令中的foo替換爲bar,並執行
^foo^bar
5、traceroute+ping
mtr google.com
6、快速調用一個編輯器來編寫一個命令
ctrl-x e
7、執行一個命令,但不保存在命令歷史記錄中
<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端口開啓隧道
ssh -N -L2001:localhost:80 someachine
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/dsp
18、掛載一個臨時的內存分區
mount -t tmpfs tmpfs /mnt -o size=1024m
19、以SSH的方式掛載目錄/文件系統
sshfs 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.xml</a>