Claude Code Cheat SheetClaude Code Cheat Sheet

Quick reference for commands, shortcuts, real workflows and interactive practice.Tra cứu nhanh lệnh, phím tắt, workflow thực tế và luyện tập tương tác.

⬇️InstallCài Đặt 5
  • curl -fsSL https://claude.ai/install.sh | bash

    Install on macOS / Linux (auto-updates)Cài trên macOS / Linux (tự cập nhật)

    Recommended — no Node.js neededCách được khuyên dùng — không cần Node.js

  • brew install --cask claude-code

    Install via Homebrew (manual updates)Cài qua Homebrew (cập nhật thủ công)

  • irm https://claude.ai/install.ps1 | iex

    Install on Windows PowerShellCài trên Windows PowerShell

  • claude --version

    Check the installed versionKiểm tra phiên bản đã cài

  • /doctor

    Health check — install, network, configHealth check — kiểm tra cài đặt, mạng, cấu hình

    Run inside a Claude Code sessionChạy trong Claude Code session

Essential CommandsLệnh Thiết Yếu 4
  • /compact

    Compress context when nearly fullNén context khi gần đầy

  • /clear

    Clear context, start freshXoá context, bắt đầu phiên mới

  • /init

    Create a CLAUDE.md for the projectTạo file CLAUDE.md cho project

  • /model

    Switch the active modelĐổi model đang dùng

🛡️PermissionsChế Độ Quyền 2
  • /permissions

    View and edit session permissionsXem và chỉnh quyền cho phiên

  • --dangerously-skip-permissions

    Skip all permission promptsBỏ qua mọi prompt quyền

    Only in a safe sandbox environmentChỉ dùng trong môi trường sandbox an toàn