Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Linux 系統教學 >> 關於 Linux

Linux 指令學習四大秘笈:每日提示、whatis、man/help、語法速成

編輯:關於 Linux

技巧一:每日隨機指令提示

編輯 ~/.bashrc 加入:

echo "Did you know that:"; whatis $(ls /bin | shuf -n 1)

進階版(需安裝 cowsay):

cowsay -f $(ls /usr/share/cowsay/cows | shuf -n 1 | cut -d. -f1) \
       $(whatis $(ls /bin) 2>/dev/null | shuf -n 1)

技巧二:善用 whatis 秒懂指令用途

whatis sudo yum install cheese

輸出每個關鍵字的簡短說明,快速掌握複雜指令鏈結構。

技巧三:man 與 -help 兩大查閱管道

  • man cp:完整手冊,適合深入研讀。
  • cp --help:終端直接列出常用參數,適合快速查閱。

技巧四:掌握指令通用語法結構

[sudo] program [參數...] [-旗標 [參數]] ...
  • sudo:需 root 權限時加上。
  • program:執行檔名稱(如 tar、firefox)。
  • 參數與旗標:依程式設計而異,旗標可帶參數(如 -y)。

結語

結合每日提示、whatis、man/help、語法架構四大法寶,配合實戰練習,Linux 指令不再是背誦負擔,而是得心應手的工具。

Copyright © Windows教程網 All Rights Reserved