安裝和設定 Windows 終端機Install and set up Windows Terminal

安裝Installation

您可以從 Microsoft Store 安裝 Windows 終端機。You can install Windows Terminal from the Microsoft Store.

如果您無法存取 Microsoft Store,該組建也會發佈在 GitHub 版本頁面上。If you don't have access to the Microsoft Store, the builds are published on the GitHub releases page. 如果您從 GitHub 安裝,終端機將不會自動以新版本進行更新。If you install from GitHub, the terminal will not automatically update with new versions.

初次執行First run

安裝之後,當您開啟終端機時,其會在已開啟的索引標籤中以 PowerShell 作為預設設定檔來啟動。After installation, when you open the terminal, it will start with PowerShell as the default profile in the open tab.

Windows 終端機的第一次執行

動態設定檔Dynamic profiles

如果您已安裝 WSL 散發套件版本或多個版本的 PowerShell,終端機就會自動為您建立設定檔。The terminal will automatically create profiles for you if you have WSL distros or multiple versions of PowerShell installed. 若要深入了解動態設定檔,請參閱動態設定檔頁面Learn more about dynamic profiles on the Dynamic profiles page.

開啟新的索引標籤Open a new tab

您可以按Ctrl + Shift + T或選取 + (加號) 按鈕,開啟預設設定檔的新索引標籤。You can open a new tab of the default profile by pressing Ctrl+Shift+T or by selecting the + (plus) button. 若要開啟不同設定檔,請選取 [+] 按鈕旁邊的 [˅] (箭頭),以開啟下拉式功能表。To open a different profile, select the ˅ (arrow) next to the + button to open the dropdown menu. 您可以從該處選取要開啟的設定檔。From there, you can select which profile to open.

叫用命令選擇區Invoke the command palette

您可以透過 命令選擇區叫用 Windows 終端機的大部分功能。You can invoke most features of Windows Terminal through the command palette. 用來叫用它的預設按鍵組合是Ctrl + Shift + PThe default key combination to invoke it is Ctrl+Shift+P.

使用中的命令選擇區範例

開啟新窗格Open a new pane

您可以使用窗格並排執行多個命令介面。You can run multiple shells side-by-side using panes. 若要開啟窗格,您可以對垂直窗格使用alt + shift , + + + + - 針對水準窗格使用 alt shift。To open a pane, you can use Alt+Shift++ for a vertical pane or Alt+Shift+- for a horizontal one. 您也可以使用Alt + Shift + D來開啟焦點設定檔的重複窗格。You can also use Alt+Shift+D to open a duplicate pane of your focused profile. 若要深入了解窗格,請參閱窗格頁面Learn more about panes on the Panes page.

設定Configuration

若要自訂 Windows 終端機的設定,請在下拉式功能表中選取 [設定]。To customize the settings of your Windows Terminal, select Settings in the dropdown menu. 這會在您的預設文字編輯器中開啟 settings.json 檔案。This will open the settings.json file in your default text editor. (預設文字編輯器會定義在您的 Windows 設定中)。(The default text editor is defined in your Windows settings.)

終端機支援自訂影響整個應用程式的全域屬性、影響每個設定檔設定的 配置檔案屬性 ,以及可讓您使用鍵盤或命令選擇區與終端機互動的 動作The terminal supports customization of global properties that affect the whole application, profile properties that affect the settings of each profile, and actions that allow you to interact with the terminal using your keyboard or the command palette.

提示

如果您使用 Windows 終端機預覽,也可以使用 [設定] UI 來設定您的設定。You can also use the settings UI to configure your settings if you are using Windows Terminal Preview. 您可以在 [動作] 頁面上瞭解如何開啟設定 UI。You can learn how to open the settings UI on the Actions page.

命令列引數Command line arguments

您可以使用命令列引數,以特定設定啟動終端機。You can launch the terminal in a specific configuration using command line arguments. 這些引數可讓您使用有自訂設定檔設定的特定索引標籤和窗格來開啟終端機。These arguments let you open the terminal with specific tabs and panes with custom profile settings. 若要深入了解命令列引數,請參閱命令列引數頁面Learn more about command line arguments on the Command line arguments page.

疑難排解Troubleshooting

如果您在使用終端機時遇到任何問題,請參考疑難排解頁面If you encounter any difficulties using the terminal, reference the Troubleshooting page. 如果您發現任何錯誤或有功能要求,則可以在終端機的 [關於] 功能表中選取意見反應連結,以移至 GitHub 頁面,並於其中提出新問題。If you find any bugs or have a feature request, you can select the feedback link in the About menu of the terminal to go to the GitHub page where you can file a new issue.