Computer >> Hướng Dẫn Máy Tính >  >> Hệ Thống >> Windows 11

Hướng dẫn cài Windows Terminal & đặt làm shell mặc định trên Windows 11

Windows Terminal – ứng dụng host dòng lệnh hiện đại chạy song song Command Prompt, PowerShell, bash (qua WSL)... Bài viết hướng dẫn: cài đặt, đặt làm terminal mặc định, đặt profile mặc định, và hơn thế nữa.

Cài đặt Windows Terminal

Cách cài:

  1. Microsoft Store (cách chính).
  2. GitHub Releases (nếu không truy cập Store) – không tự động cập nhật.
  3. Windows Terminal Preview – dùng tính năng thử nghiệm sớm.
  4. Chỉ Windows 11: dùng winget install Microsoft.WindowsTerminal trong CMD/PowerShell (người viết cho là dễ hơn cả Store).

Cũng có thể dùng Chocolatey/Scoop.

Đặt làm Default Terminal Application (chỉ Windows 11)

  1. Mở Windows Terminal > Settings (hoặc Ctrl + ,).
  2. Tab Startup > chọn Windows Terminal làm Default terminal application.
  3. Click Save.

Hướng dẫn cài Windows Terminal & đặt làm shell mặc định trên Windows 11 Hướng dẫn cài Windows Terminal & đặt làm shell mặc định trên Windows 11

Xong! Mọi lệnh dòng lệnh sẽ mở qua Windows Terminal.

Đặt Default Profile

Mặc định là PowerShell. Đổi:

  1. Settings > Startup (Ctrl + ,).
  2. Chọn profile muốn mặc định (PowerShell, Command Prompt, bash...).
  3. Save.

Hướng dẫn cài Windows Terminal & đặt làm shell mặc định trên Windows 11 Hướng dẫn cài Windows Terminal & đặt làm shell mặc định trên Windows 11

Thêm profile mới

Profiles tự tạo nếu có WSL distro hoặc nhiều phiên bản PowerShell. Xem pane trái Settings.

  1. Dưới Profiles > Add a new profile.
  2. Chọn New empty profile hoặc Duplicate (copy profile có sẵn).
  3. Save.

Hướng dẫn cài Windows Terminal & đặt làm shell mặc định trên Windows 11 Hướng dẫn cài Windows Terminal & đặt làm shell mặc định trên Windows 11

Mở tab/pane mới

  • Tab mới: click + hoặc Ctrl + Shift + T. Click mũi tên bên cạnh + để chọn profile khác cho tab mới.
  • Pane (chia màn hình): Alt + Shift + + (dọc), Alt + Shift + - (ngang), Alt + Shift + D (nhân bản), Ctrl + Shift + W (đóng), Alt + mũi tên (chuyển pane).

Hướng dẫn cài Windows Terminal & đặt làm shell mặc định trên Windows 11 Hướng dẫn cài Windows Terminal & đặt làm shell mặc định trên Windows 11 Hướng dẫn cài Windows Terminal & đặt làm shell mặc định trên Windows 11 Hướng dẫn cài Windows Terminal & đặt làm shell mặc định trên Windows 11

Lưu ý: Giữ Alt khi chọn profile cho pane mới – không thì mở tab mới.

Command Palette

Phím tắt: Ctrl + Shift + P – truy cập hầu hết tính năng.

Settings JSON file

Cấu hình bằng code thay vì GUI. Đường dẫn file settings.json:

  • Stable: %LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json
  • Preview: %LOCALAPPDATA%\Packages\Microsoft.WindowsTerminalPreview_8wekyb3d8bbwe\LocalState\settings.json
  • Unpackaged (Scoop/Chocolatey): %LOCALAPPDATA%\Microsoft\Windows Terminal\settings.json

Mở từ Settings: pane trái > Open JSON file.

Gặp sự cố? Xem Troubleshooting trước khi report GitHub.

Bạn ngại gì nhất về Windows Terminal? Comment cho chúng tôi!