Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> ระบบ >> Windows

เปลี่ยน Default Shell ใน Windows Terminal

Windows Terminal ใช้ Windows PowerShell เป็น Default Shell หากต้องการเปลี่ยนเป็น Command Prompt, Bash หรือ Shell อื่น ทำได้ 2 วิธี

วิธีที่ 1: ผ่าน UI Settings (Windows Terminal ใหม่)

  1. เปิด Windows Terminal → Ctrl + , หรือ ลูกศรลง → Settings
  2. แท็บ Startup
  3. Default profile Dropdown → เลือก Shell ที่ต้องการ (Command Prompt, PowerShell, Ubuntu, ฯลฯ)
  4. คลิก Save

วิธีที่ 2: แก้ไข settings.json (เวอร์ชันเก่า)

  1. Settings → Open JSON file (Notepad)
  2. หา Section "defaults"
  3. Copy GUID ของ Shell ที่ต้องการ (ไม่รวมเครื่องหมายคำพูด) → วางใน "defaultProfile"

ตัวอย่าง: Copy GUID ของ Command Prompt → ใส่ใน defaultProfile

เพิ่ม Custom Profile

Settings → Add new → กรอกข้อมูล → Save → จะปรากฏใน Default Profile Dropdown