Windows Terminal เป็นการรวมเครื่องมือ Command-line ต่างๆ เช่น Windows PowerShell, PowerShell, Command Prompt ฯลฯ ให้ใช้เครื่องมือ Command-line มากกว่าหนึ่งอย่างพร้อมกันจากหน้าต่างเดียวบน Windows 11/10 หากคุณจะใช้ครั้งแรก อาจไม่เข้าใจเครื่องมือนี้เต็มที่ นั่นคือเหตุผลที่คุณต้องอ่านบทความนี้ เพื่อรู้ว่า Windows PowerShell, PowerShell, Azure Cloud Shell, และ Command Prompt ใน Windows Terminal คืออะไร

ก่อนเริ่มใช้เครื่องมือเฉพาะใน Windows Terminal คุณต้องรู้จัก Windows Terminal เอง สำหรับข้อมูล Windows Terminal เป็น Multi-tabbed Utility ให้ผู้ใช้ใช้เครื่องมือหลายอย่าง (Command Prompt, Windows PowerShell, PowerShell, Azure Cloud Shell ฯลฯ) จากหน้าต่างเดียว สามารถใช้เป็น Dedicated Tool โดยไม่ต้องเปิดหน้าต่างแยกสำหรับแต่ละแอป
โดยทั่วไป คุณต้องมีหน้าต่างแยกสำหรับ Windows PowerShell, อีกหน้าต่างสำหรับ Command Prompt ฯลฯ แต่ Windows Terminal ตัด Clutter นั้นออก ให้ใช้เครื่องมือทั้งสองจากหน้าต่างเดียว
Windows PowerShell, PowerShell, Azure Cloud Shell, Command Prompt ใน Terminal - อธิบาย
Windows PowerShell, Azure Cloud Shell, และ Command Prompt ใน Windows Terminal ทำงานเหมือน Dedicated Tool ทุกประการ ไม่มีความแตกต่างระหว่างการรันคำสั่งใน Dedicated Windows PowerShell Window กับ Windows Terminal's Windows PowerShell Window เช่นกัน ไม่มีความแตกต่างระหว่างการรันคำสั่งใน Dedicated CMD Window กับ Command Prompt ใน Windows Terminal
อีกฝั่งหนึ่ง PowerShell เข้ากันได้กับ Windows, macOS, และ Linux กล่าวคือ PowerShell 7.2 และเวอร์ชันใหม่กว่า สร้างบน .NET Core แทน .NET Framework ทำให้ได้ PowerShell บนแพลตฟอร์มอื่นนอกจาก Windows หากเคยใช้มาก่อนและอยากลองบน Windows 11/10 สามารถหาได้ใน Windows Terminal
ต่อไปคือ Azure Cloud Shell โดยทั่วไปมันให้ Browser-based Shell Experience แต่อยากได้ใน Windows Terminal ต้องเปิด Azure Cloud Shell Profile
คุณมีข้อดีมากมายจากการมี Utilities ทั้งหมดอยู่ที่เดียว จากการปรับแต่ง Panel ไปจนถึงการเพิ่ม Profiles ทำได้หมดขณะใช้ Windows Terminal เกี่ยวกับการปรับแต่ง สมมติคุณไม่ต้องการสีฟ้าทั่วไปใน Background ของ Windows PowerShell ในกรณีเช่นนั้น สามารถเปลี่ยนเป็นอย่างอื่นที่ชอบได้
ปรับแต่ง Windows Terminal, PowerShell, Azure Cloud Shell, และ Command Prompt ใน Windows Terminal
เพื่อปรับแต่ง Windows Terminal, Azure Cloud Shell, และ Command Prompt ใน Windows Terminal ทำตามขั้นตอน:
- เปิด Windows Terminal บนคอมพิวเตอร์
- คลิกไอคอนลูกศรใน Title Bar เลือก Settings
- เลือก Profile ด้านซ้าย
- สลับไปแท็บ Appearance
- เลือก Font, Font Size, Font Weight, Background Color ฯลฯ ที่ต้องการ
- กดปุ่ม Save
เริ่มต้นด้วยการเปิด Windows Terminal คลิกไอคอนลูกศรใน Title Bar จากรายการที่เปิด เลือก Settings และเลือก Profile ด้านซ้าย

หน้าจอถัดไป สามารถเปลี่ยน Default Setting ตามต้องการ สำหรับข้อมูล สามารถเปลี่ยน Font Family และ Size, ชื่อ Profile, Icon, Tab Title, Font Weight, Cursor Shape, ตั้ง Background Image และอื่นๆ

สุดท้าย ต้องกดปุ่ม Save เพื่อบันทึกการเปลี่ยนแปลงทั้งหมด สำหรับข้อมูล รายการตัวเลือกจะเปลี่ยนเมื่อคุณเปลี่ยน Profile
วิธีเปลี่ยน Startup Profile ใน Windows Terminal

โดยค่าเริ่มต้น Windows Terminal เปิด Windows PowerShell แต่คุณอาจไม่ต้องการ Windows PowerShell ตลอดเวลา และอยากใช้ Command Prompt หรืออย่างอื่น สำหรับนั้น ต้องเปลี่ยน Default Shell ใน Windows Terminal
เพื่อเปลี่ยน Startup Profile ใน Windows Terminal ทำตามขั้นตอน:
- เปิด Windows Terminal บน PC
- คลิกไอคอนลูกศรใน Title Bar
- เลือก Settings
- แน่ใจว่าอยู่ที่แท็บ Startup
- ขยาย Dropdown Default Profile
- เลือก Profile ที่ต้องการ
- กด Save
หลังจากนั้น Windows Terminal จะเปิด Startup Profile ใหม่ อย่างไรก็ตาม หากต้องการเพิ่ม Profile ใหม่ใน Windows Terminal ต้องทำตามคู่มือ Step-by-step นี้
Windows Terminal ใช้ทำอะไร?
Windows Terminal ใช้สำหรับรันคำสั่งบน Windows 11/10 Computer สามารถพิมพ์คำสั่งใดๆ ที่ใช้ใน Windows PowerShell, Command Prompt, และ Shell อื่นๆ ได้ ไม่ว่าจะรันคำสั่งเดี่ยวหรือหลายคำสั่ง ก็ทำได้ใน Windows Terminal
Windows Terminal เหมือน Command Prompt ไหม?
ไม่ Command Prompt เป็น Dedicated Tool ที่มาพร้อม Windows Computer ตัวที่สอง Command Prompt เป็นส่วนหนึ่งของ Windows Terminal สามารถเพิ่ม Command-line Tools อื่นๆ เช่น Windows PowerShell ใน Windows Terminal ได้
ขอให้โชคดี! หวังว่าคู่มือนี้ช่วยให้คุณเข้าใจ Methodology ของ Windows Terminal
อ่านเพิ่มที่น่าสนใจ:
- How to Add or Remove Open in Windows Terminal from Context Menu
- How to add Open Windows Terminal as an administrator in the Context Menu
- How to change Default Color Scheme in Windows Terminal
- How to enable Transparent Background in Windows Terminal
- How to reset Windows Terminal settings to default
- How to open Windows Terminal as an administrator.