Which two of the following can you type at a Start menu in Windows to open a command prompt choose two?

To open the Start menu—which contains all your apps, settings, and files—you can do any of the following:

  • On the center or left end of the taskbar, select the Start  icon.

    Note: Your taskbar settings determine where the taskbar is located.

    Which two of the following can you type at a Start menu in Windows to open a command prompt choose two?

  • Press the Windows logo key on your keyboard.

  • Swipe up from the bottom center or left of your screen.

    Note: When using display languages that read right-to-left (RTL), you can swipe up from the bottom center or right of your screen.

To open the Start menu—which contains all your apps, settings, and files—do either of the following:

  • On the left end of the taskbar, select the Start  icon.

    Which two of the following can you type at a Start menu in Windows to open a command prompt choose two?

  • Press the Windows logo key  on your keyboard. 

Skip to main content

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Using command line arguments for Windows Terminal

  • Article
  • 11/03/2022
  • 15 minutes to read

In this article

You can use wt.exe to open a new instance of Windows Terminal from the command line. You can also use the execution alias wt instead.

Note

If you built Windows Terminal from the source code on GitHub, you can open that build using wtd.exe or wtd.

Which two of the following can you type at a Start menu in Windows to open a command prompt choose two?

Command line syntax

The wt command line accepts two types of values: options and commands. Options are a list of flags and other parameters that can control the behavior of the wt command line as a whole. Commands provide the action, or list of actions separated by semicolons, that should be implemented. If no command is specified, then the command is assumed to be new-window by default.

wt [options] [command ; ]

Note

The behavior of the wt.exe command may be affected by the windowingBehavior property. This setting can be adjusted to default between opening a new window or opening a new tab.

To display a help message listing the available command line arguments, enter: wt -h, wt --help, wt -?, or wt /?.

Options and commands

Below is the full list of supported commands and options for the wt command line.

OptionDescription
--help, -h, -?, /? Displays the help message.
--maximized, -M Launches the terminal maximized.
--fullscreen, -F Launches the terminal as full screen.
--focus, -f Launches the terminal in the focus mode. Can be combined with maximized.
--window, -w <window-id> Launches the terminal in a specific window.

New-tab command

CommandParameterDescriptionValues
new-tab, nt --profile, -p profile-name Creates a new tab based on the profile name assigned. Profile name
new-tab, nt --startingDirectory, -d starting-directory Creates a new tab based on the starting directory path assigned. Directory path
new-tab, nt commandline Creates a new tab based on the command line assigned. Executable with optional commands
new-tab, nt --title Creates a new tab with the title assigned. Text to use as the tab title
new-tab, nt --tabColor Creates a new tab with the tab color assigned. Hex color as #RGB or #RRGGBB

Tip

If you change the title of a tab in Windows Terminal and want that title to persist, you must enable the suppressApplicationTitle option by setting it to true.

Split-pane command

CommandParameterDescriptionValues
split-pane, sp -H, --horizontal, -V, --vertical Creates a new split window pane either horizontally or vertically. N/A. No additional values to assign.
split-pane, sp --profile, -p profile-name Creates a new split window pane based on the assigned command line profile. If this parameter is not assigned, the default profile will be used. Profile name
split-pane, sp --startingDirectory, -d starting-directory Creates a new split window pane based on the assigned starting directory path. If this parameter is not assigned, the default starting directory will be used. Directory path
split-pane, sp --title Creates a new split window pane with the assigned title. Text to use as the tab title
split-pane, sp --tabColor Creates a new split window pane with the assigned tab color. Hex color as #RGB or #RRGGBB
split-pane, sp --size, -s size Creates a new split window pane with the assigned size. Float that specifies the portion of the parent pane to use represented by a decimal. For example, .4 to represent 40% of the parent pane.
split-pane, sp commandline Creates a new split window pane based on the assigned command line. Executable with optional commands
split-pane, sp --duplicate, -D Creates a new split window pane that is a duplicate of the current pane. N/A. No additional values to assign.

Focus-tab command

CommandParameterDescriptionValues
focus-tab, ft --target, -t tab-index Focuses on a specific tab according to it's tab index number. Tab index as an integer

Move-focus command

CommandParameterDescriptionValues
move-focus, mf direction Move focus between panes in the given direction. up, down, left, or right values accepted.

Note

When opening Windows Terminal from cmd (Command Prompt), if you want to use your custom "cmd" profile settings, you will need to use the command wt -p cmd. Otherwise, to run your default profile settings, just use wt cmd.

Command line argument examples

Commands may vary slightly depending on which command line you're using.

Passing an argument to the default shell

To start an instance of Windows Terminal and have it execute a command, call wt.exe followed by your command.

Here's an example of calling Windows Terminal to pass a ping command argument to echo an IP address:

wt ping learn.microsoft.com

Here's an example of calling Windows Terminal to open a new tab with a PowerShell command line, confirming to call the Start-Service command, and opening another new tab with Windows Command Prompt open to the /k directory:

wt new-tab PowerShell -c Start-Service ; new-tab cmd /k dir

Target a specific window

Below are examples of how to target specific windows using the --window,-w option.

  • Command Prompt
  • PowerShell
  • Linux
// Open a new tab with the default profile in the current window
wt -w 0 nt

// Open a new tab in a new window with the default profile
wt -w -1 nt

// Open a new tab in the first-created terminal window with the default profile
wt -w 1 nt

// Open a new tab in the terminal window named foo with the default profile. If foo does not exist, create a new window named foo.
wt -w foo nt
// Open a new tab with the default profile in the current window
wt -w 0 nt

// Open a new tab in a new window with the default profile
wt -w -1 nt

// Open a new tab in the first-created terminal window with the default profile
wt -w 1 nt

// Open a new tab in the terminal window named foo with the default profile. If foo does not exist then, create a new window named foo.
wt -w foo nt
// Open a new tab with the default profile in the current window
cmd.exe /c "wt.exe" -w 0 nt

// Open a new tab in a new window with the default profile
cmd.exe /c "wt.exe" -w -1 nt

// Open a new tab in the first-created terminal window with the default profile
cmd.exe /c "wt.exe" -w 1 nt

// Open a new tab in the terminal window named foo with the default profile. If foo does not exist then, create a new window named foo.
cmd.exe /c "wt.exe" -w foo nt

Execution aliases do not work in WSL distributions. If you want to use wt.exe from a WSL command line, you can spawn it from CMD directly by running cmd.exe. The /c option tells CMD to terminate after running.

Open a new profile instance

To open a new terminal instance, in this case the command will open the profile named "Ubuntu-18.04", enter:

  • Command Prompt
  • PowerShell
  • Linux
wt -p "Ubuntu-18.04"
wt -p "Ubuntu-18.04"
cmd.exe /c "wt.exe" -p "Ubuntu-18.04"

Execution aliases do not work in WSL distributions. If you want to use wt.exe from a WSL command line, you can spawn it from CMD directly by running cmd.exe. The /c option tells CMD to terminate after running.

The -p flag is used to specify the Windows Terminal profile that should be opened. Substitute "Ubuntu-18.04" with the name of any terminal profile that you have installed. This will always open a new window. Windows Terminal is not yet capable of opening new tabs or panes in an existing instance.

Target a directory

To specify the folder that should be used as the starting directory for the console, in this case the d:\ directory, enter:

  • Command Prompt
  • PowerShell
  • Linux
wt -d d:\
wt -d d:\
cmd.exe /c "wt.exe" -d d:\

Execution aliases do not work in WSL distributions. If you want to use wt.exe from a WSL command line, you can spawn it from CMD directly by running cmd.exe. The /c option tells CMD to terminate after running.

Multiple tabs

To open a new terminal instance with multiple tabs, enter:

  • Command Prompt
  • PowerShell
  • Linux
wt ; ;
wt `; `;

PowerShell uses a semicolon ; to delimit statements. To interpret a semicolon ; as a command delimiter for wt command-line arguments, you need to escape semicolon characters using backticks. PowerShell also has the stop parsing operator (--%), which instructs it to stop interpreting anything after it and just pass it on verbatim.

cmd.exe /c "wt.exe" \; \;

Execution aliases do not work in WSL distributions. If you want to use wt.exe from a WSL command line, you can spawn it from CMD directly by running cmd.exe. The /c option tells CMD to terminate after running.

To open a new terminal instance with multiple tabs, in this case a Command Prompt profile and a PowerShell profile, enter:

  • Command Prompt
  • PowerShell
  • Linux
wt -p "Command Prompt" ; new-tab -p "Windows PowerShell"
wt -p "Command Prompt" `; new-tab -p "Windows PowerShell"

PowerShell uses a semicolon ; to delimit statements. To interpret a semicolon ; as a command delimiter for wt command-line arguments, you need to escape semicolon characters using backticks. PowerShell also has the stop parsing operator (--%), which instructs it to stop interpreting anything after it and just pass it on verbatim.

cmd.exe /c "wt.exe" -p "Command Prompt" \; new-tab -p "Windows PowerShell"

Execution aliases do not work in WSL distributions. If you want to use wt.exe from a WSL command line, you can spawn it from CMD directly by running cmd.exe. The /c option tells CMD to terminate after running and the \; backslash + semicolon separates commands.

Multiple panes

To open a new terminal instance with one tab containing three panes running a Command Prompt profile, a PowerShell profile, and your default profile running a WSL command line, enter:

  • Command Prompt
  • PowerShell
  • Linux
wt -p "Command Prompt" ; split-pane -p "Windows PowerShell" ; split-pane -H wsl.exe
wt -p "Command Prompt" `; split-pane -p "Windows PowerShell" `; split-pane -H wsl.exe

PowerShell uses a semicolon ; to delimit statements. To interpret a semicolon ; as a command delimiter for wt command-line arguments, you need to escape semicolon characters using backticks. PowerShell also has the stop parsing operator (--%), which instructs it to stop interpreting anything after it and just pass it on verbatim.

cmd.exe /c "wt.exe" -p "Command Prompt" \; split-pane -p "Windows PowerShell" \; split-pane -H wsl.exe

Execution aliases do not work in WSL distributions. If you want to use wt.exe from a WSL command line, you can spawn it from CMD directly by running cmd.exe. The /c option tells CMD to terminate after running and the \; backslash + semicolon separates commands.

The -H flag (or --horizontal) indicates that you would like the panes to be split horizontally. The -V flag (or --vertical) indicates that you would like the panes split vertically.

Multiple tabs and panes

The new-tab and split-pane commands can be sequenced to get multiple tabs, each with split panes. To open a new terminal instance with two tabs, each with two panes running a Command Prompt and a WSL command line, with each tab in a different directory, enter:

  • Command Prompt
  • PowerShell
  • Linux
wt -p "Command Prompt" ; split-pane -V wsl.exe ; new-tab -d c:\ ; split-pane -H -d c:\ wsl.exe
wt -p "Command Prompt" `; split-pane -V wsl.exe `; new-tab -d c:\ `; split-pane -H -d c:\ wsl.exe

PowerShell uses a semicolon ; to delimit statements. To interpret a semicolon ; as a command delimiter for wt command-line arguments, you need to escape semicolon characters using backticks. PowerShell also has the stop parsing operator (--%), which instructs it to stop interpreting anything after it and just pass it on verbatim.

cmd.exe /c "wt.exe" -p "Command Prompt" \; split-pane -V wsl.exe \; new-tab -d c:\\ \; split-pane -H -d c:\\ wsl.exe

Execution aliases do not work in WSL distributions. If you want to use wt.exe from a WSL command line, you can spawn it from CMD directly by running cmd.exe. The /c option tells CMD to terminate after running and the \; backslash + semicolon separates commands. Note to specify a Windows directory as the starting directory for wsl.exe that two backslashes \\ are required.

Pane title

To open a new terminal instance with custom titles for each terminal pane, use the --title argument. To set the title of each pane when opening multiple tabs, enter:

  • Command Prompt
  • PowerShell
  • Linux
wt --title tabname1 ; new-tab -p "Ubuntu-18.04" --title tabname2
wt --title tabname1 `; new-tab -p "Ubuntu-18.04" --title tabname2
cmd.exe /c "wt.exe" --title tabname1 \; new-tab -p "Ubuntu-18.04" --title tabname2

Execution aliases do not work in WSL distributions. If you want to use wt.exe from a WSL command line, you can spawn it from CMD directly by running cmd.exe. The /c option tells CMD to terminate after running and the \; forward-slash + semicolon separates commands.

Panes in the same tab can have different titles, which will reflect on the tab title depending on which pane has focus. To name independent panes, you can set the title after splitting the panes by entering:

  • Command Prompt
  • PowerShell
  • Linux
wt --title pane1 ; split-pane -p "Command Prompt" --title pane2
wt --title pane1 `; split-pane -p "Command Prompt" --title pane2
cmd.exe /c "wt.exe" --title pane1 \; split-pane -p "Command Prompt" --title pane2

Execution aliases do not work in WSL distributions. If you want to use wt.exe from a WSL command line, you can spawn it from CMD directly by running cmd.exe. The /c option tells CMD to terminate after running and the \; forward-slash + semicolon separates commands.

Using application title

To open a new terminal instance allowing applications within it to set the tab title by sending title change messages, use the --useApplicationTitle flag. To suppress these messages, use the --suppressApplicationTitle flag. If none of these flags are provided, the behavior is inherited from the profile's settings. To open a tab with title tabname that will not be overridden by the application, enter:

  • Command Prompt
  • PowerShell
  • Linux
wt --title tabname --suppressApplicationTitle
wt --title tabname --suppressApplicationTitle
cmd.exe /c "wt.exe" --title tabname --suppressApplicationTitle

Execution aliases do not work in WSL distributions. If you want to use wt.exe from a WSL command line, you can spawn it from CMD directly by running cmd.exe. The /c option tells CMD to terminate after running and the \; backslash + semicolon separates commands.

Tab color

To open a new terminal instance with custom tab colors, use the --tabColor argument. This argument overrides the value defined in the profile, but can be overridden as well using the tab color picker. In the following example, a new terminal is created with two tabs of different colors:

  • Command Prompt
  • PowerShell
  • Linux
wt --tabColor #009999 ; new-tab --tabColor #f59218
wt --tabColor '#009999' `; new-tab --tabColor '#f59218'
cmd.exe /c "wt.exe" --tabColor #009999 \; new-tab --tabColor #f59218

Execution aliases do not work in WSL distributions. If you want to use wt.exe from a WSL command line, you can spawn it from CMD directly by running cmd.exe. The /c option tells CMD to terminate after running and \; separates commands.

When --tabColor is set for a tab, it is associated with the first pane of this tab. Hence in a tab with multiple panes, the color will be applied only if the first pane is in focus. To set the tab color for additional panes, you will need to add the --tabColor parameter to the split-pane subcommand as well. In the example below, a tab with two panes is created with tab colors specified for each pane:

wt new-tab --tabColor '#009999' `; split-pane --tabColor '#f59218'

Color scheme

To open a new terminal instance with a specific color scheme (instead of the colorScheme set in the profile), use the --colorScheme argument. This argument overrides the value defined in the profile.

  • Command Prompt
  • PowerShell
  • Linux
wt --colorScheme Vintage ; split-pane --colorScheme "Tango Light"
wt --colorScheme Vintage `; split-pane --colorScheme "Tango Light"
cmd.exe /c "wt.exe" --colorScheme Vintage \; split-pane --colorScheme "Tango Light"

Execution aliases do not work in WSL distributions. If you want to use wt.exe from a WSL command line, you can spawn it from CMD directly by running cmd.exe. The /c option tells CMD to terminate after running and \; separates commands.

Tab focus

To open a new terminal instance with a specific tab in focus, use the -t flag (or --target), along with the tab-index number. To open your default profile in the first tab and the "Ubuntu-18.04" profile focused in the second tab (-t 1), enter:

  • Command Prompt
  • PowerShell
  • Linux
wt ; new-tab -p "Ubuntu-18.04" ; focus-tab -t 1
wt `; new-tab -p "Ubuntu-18.04" `; focus-tab -t 1
cmd.exe /c "wt.exe" \; new-tab -p "Ubuntu-18.04" \; focus-tab -t 1

Execution aliases do not work in WSL distributions. If you want to use wt.exe from a WSL command line, you can spawn it from CMD directly by running cmd.exe. The /c option tells CMD to terminate after running and the \; backslash + semicolon separates commands.

Examples of multiple commands from PowerShell

Windows Terminal uses the semicolon character ; as a delimiter for separating commands in the wt command line. Unfortunately, PowerShell also uses ; as a command separator. To work around this, you can use the following tricks to run multiple wt commands from PowerShell. In all the following examples, a new terminal window is created with three panes - one running Command Prompt, one with PowerShell, and the last one running WSL.

The following examples do not use start to run the command line. Instead, there are two other methods of escaping the command line:

  • Only escaping the semicolons so that PowerShell will ignore them and pass them straight to wt.
  • Using --%, so PowerShell will treat the rest of the command line as arguments to the application.
wt new-tab "cmd" `; split-pane -p "Windows PowerShell" `; split-pane -H wsl.exe
wt --% new-tab cmd ; split-pane -p "Windows PowerShell" ; split-pane -H wsl.exe

In both of these examples, the newly created Windows Terminal window will create the window by correctly parsing all the provided command-line arguments.

However, these methods are not recommended currently, as PowerShell will wait for the newly-created terminal window to be closed before returning control to PowerShell. By default, PowerShell will always wait for Windows Store applications (like Windows Terminal) to close before returning to the prompt. Note that this is different than the behavior of Command Prompt, which will return to the prompt immediately.

Feedback

Submit and view feedback for

Which of the following can you type at a Start menu in Windows to open a command prompt?

How to Open the Command Prompt in Windows 10 and Windows 11.
Type "command prompt" into the Start menu to search for it. ... .
Press Win + R to open the Run box, then type "cmd" and hit Enter to open it..
Press Win + X (or right-click the Start button) and choose Command Prompt from the menu..

Which of the following allows you to navigate file folder structures in Windows?

Which of the following allows you to navigate file⁄folder structures in Windows 10? The File Explorer allows you to navigate the file⁄folder structure in Windows 10. The Start menu allows you to launch applications.

Which of these is not one of the five functions of an operating system?

job control is not included in basic functions of operating system. we can use job scheduling, memory management and data management. operating systems help people interface with computers and provide network. job control is not a function opearting systemcapabilities.

Which of the following is not a system program type?

Explanation : Storage Translators is not a System Software Program Type.