- 切換目錄 (cd)
- 切換到家目錄:cd ~
- 切換到上一層目錄:cd ..
- 切換到根目錄:cd /
- 列出檔案和目錄 (ls)
- 列出當前目錄內容:ls
- 列出當前目錄內容(含隱藏檔案):ls -a
- 列出檔案與目錄詳細資訊:ls -l
- 建立和刪除目錄 (mkdir 和 rmdir)
- 建立新目錄:mkdir new_folder
- 刪除空目錄:rmdir old_folder
- 建立、查看和刪除檔案 (touch, cat, rm)
- 建立新檔案:touch file.txt
- 查看檔案內容:cat file.txt
- 刪除檔案:rm file.txt
- 複製和移動/重新命名檔案 (cp 和 mv)
- 複製檔案:cp source.txt destination.txt
- 移動或重新命名檔案:mv oldname.txt newname.txt
- 查找檔案 (find)
- 在當前目錄下查找特定檔案:find . -name "file.txt"
- 編輯檔案 (nano, vi)
- 使用 nano 編輯器編輯檔案:nano file.txt
- 使用 vi 編輯器編輯檔案:vi file.txt
- 插入模式 i
8.離開 esc
9.存檔離開 :wq!
這些指令都是 Linux 系統中經常使用的基礎指令,非常適合初學者或作為快速參考使用。