Skip to content
Zepe

How to Open the Terminal in Windows

By Updated 6 min read

The short answer

Press Win + R, type cmd and press Enter, or Win + X then I for Windows Terminal on Windows 11. For admin rights use Win + X then A. Typing cmd in File Explorer's address bar opens a prompt in that folder.

How to Open the Terminal in Windows — article cover

Four things worth knowing

  • Command Prompt, PowerShell, Windows Terminal and WSL are four different things: two shells, one window that hosts them, and a Linux environment.
  • Win + X is the fastest route to an administrator prompt, and the letter after it differs between Windows 10 and 11.
  • Typing cmd or powershell into File Explorer's address bar opens a shell already in that directory, which saves a lot of cd typing.
  • You do not need administrator rights for most things, and running elevated by default removes a useful safety net.

"Open the terminal" is one of those instructions that quietly assumes you already know which terminal is meant. On macOS and Linux there is essentially one, so nobody has to say. On Windows there are four different things people mean by it, and following an instruction with the wrong one produces errors that make no sense at all, which is how you end up convinced you have broken something.

The four things people mean

Command Prompt, PowerShell, Windows Terminal and WSL compared
What it isUse it when
Command Prompt (cmd)The old shell, inherited from DOSFollowing older instructions, or running a tool that parses its output
PowerShellA modern object-based shellAnything new: it is more capable and accepts most familiar commands
Windows TerminalA window that hosts any of the others in tabsYou want tabs, panes and a decent font
WSLA real Linux environment running alongside WindowsYou need genuine Linux tools — bash, grep, ssh, package managers
Command Prompt, PowerShell, Windows Terminal and WSL compared

The distinction that matters most: Windows Terminal is not a shell. It is a window. Inside it you choose which shell to run, and by default that is PowerShell. If an instruction says "open Windows Terminal and run this", check whether the command is a PowerShell command or a Command Prompt one: they are not interchangeable.

Comparison table showing which capabilities Command Prompt and PowerShell each have, including piping objects, running Linux commands and scripting support.
Which one to open, by what you are trying to do. PowerShell is the better default. Command Prompt still matters for older instructions and for tools whose output format is being parsed.

Every way to open one

The routes worth remembering

  1. Win + R, then cmd or powershell, then Enter.

    Works identically on every version of Windows since XP. Press Ctrl + Shift + Enter instead of Enter to open it elevated.

  2. Win + X, then a letter.

    On Windows 11: I for Terminal, A for Terminal (Admin). On Windows 10: C for Command Prompt, A for Command Prompt (Admin). The menu also has Device Manager, Disk Management and Event Viewer.

  3. Start menu search.

    Press the Windows key, type terminal, cmd or powershell, then Ctrl + Shift + Enter to launch the highlighted result as administrator.

  4. From File Explorer's address bar.

    Open the folder you want, click the address bar, type cmd and press Enter. The shell opens with that folder as its working directory.

  5. Right-click inside a folder.

    On Windows 11, Open in Terminal. On Windows 10, hold Shift while right-clicking for Open PowerShell window here.

Running as administrator, and when you actually need to

An elevated prompt is simply one running with administrator privileges. The reliable way to check is the title bar: it says Administrator: at the front. If it does not, you are not elevated, whatever you clicked to get there.

You need it for changes affecting the whole system: starting or stopping services, writing to C:\Windows or C:\Program Files, ending processes belonging to another user, and most netsh, sfc, chkdsk and dism operations. You do not need it for looking at things — ipconfig, ping, tasklist, dir and navigating your own files all work fine unelevated.

WSL, when you need real Linux

The Windows Subsystem for Linux runs a genuine Linux distribution alongside Windows, and it is far better than it has any right to be. WSL 2 uses a real Linux kernel in a lightweight managed virtual machine: it starts in about a second, it shares your filesystem, and it needs no separate window.

Install and open WSL

  1. Open an administrator terminal and run wsl --install.

    This enables the required Windows features and installs Ubuntu by default. wsl --list --online shows the other distributions available.

  2. Restart when prompted.

    The virtual machine platform feature needs a reboot before it becomes available.

  3. Set a Linux username and password when the distribution first starts.

    These are unrelated to your Windows account, and the password is what sudo will ask for.

  4. Afterwards, open it by typing wsl in any shell, or pick the distribution from Windows Terminal's tab dropdown.

WSL is what you want if you are trying to run a shell script written for Linux. The guide on running a .sh file on Windows compares WSL with Git Bash and Cygwin, and covers the line-ending problem that breaks scripts edited in Windows text editors.

The commands worth knowing on day one

Basic commands and their PowerShell equivalents
TaskCommand PromptPowerShell
List filesdirGet-ChildItem (alias dir, ls)
Change foldercd foldernamesame
Up one levelcd ..same
Clear the screenclsClear-Host (alias cls)
Show IP configurationipconfig /allGet-NetIPConfiguration
List processestasklistGet-Process
End a processtaskkill /F /PID 123Stop-Process -Id 123 -Force
Copy a filecopy a.txt b.txtCopy-Item a.txt b.txt
Basic commands and their PowerShell equivalents

PowerShell keeps aliases for most of the familiar names, so dir, cls and cd all work. That is why instructions written for Command Prompt often run unchanged in PowerShell — until they hit something like output redirection or a batch-file construct, which behave differently.

Two things people actually come here to do

The two things that most often send people looking for a shell in the first place are killing something that will not close, and finding what is squatting on a port. Both have their own guides: force quitting an app covers taskkill and the cases where it does not work, and killing a process using a port covers tracing a listener back to the program holding it.

Common questions

What is the difference between Command Prompt and PowerShell?

Command Prompt is the older shell and passes plain text between commands. PowerShell passes structured objects, has a full scripting language, and offers tab completion for command parameters. PowerShell keeps aliases like dir and cd, so most familiar commands still work. Use PowerShell unless you are following instructions written specifically for Command Prompt.

How do I open a command prompt as administrator?

Press Win + X then A. Alternatively, press Win + R, type cmd, and press Ctrl + Shift + Enter rather than Enter. You can confirm it worked by checking that the window title begins with Administrator:.

How do I open a terminal in a specific folder?

Open the folder in File Explorer, click the address bar, type cmd or powershell, and press Enter — the shell opens with that folder as its working directory. On Windows 11 you can also right-click inside the folder and choose Open in Terminal; on Windows 10, Shift + right-click gives Open PowerShell window here.

Is Windows Terminal the same as Command Prompt?

No. Windows Terminal is a window that hosts shells in tabs; Command Prompt is one of the shells it can host. Opening Windows Terminal gives you PowerShell by default, not Command Prompt, which matters when you are following instructions that assume one or the other.

Sources

Each source is listed with the specific claim it supports.

  1. What is Windows Terminal? Microsoft Learn

    Supports: That Windows Terminal is a host application for multiple shells rather than a shell itself, and that it defaults to PowerShell.

  2. What is PowerShell? Microsoft Learn

    Supports: That PowerShell passes objects rather than text and includes a full scripting language, and the cmdlet names given in the comparison table.

  3. Install WSL Microsoft Learn

    Supports: The `wsl --install` command, the requirement for an administrator prompt and a restart, and that Ubuntu is the default distribution.

About the author

Writes every guide on Zepe, and rewrites them when Windows changes. Every command here is run before it is published, and every claim is traced back to a primary source, listed above.

More about RobertReport a correction

All command line guides →