How to open or launch Command Prompt in Windows 11

To open Command Prompt in Windows 11, select Start, type cmd and press Enter; to run it as administrator, right-click Command Prompt in the results and choose Run as administrator.

This guide covers eight more routes, including Run, the Win+X menu, Windows Terminal, Task Manager and the recovery screen, plus how to confirm elevation and fix a Command Prompt that opens at startup or is blocked.

How to open Command Prompt in Windows 11

Windows Search is the quickest route on every Windows 11 edition, and it offers the administrator option in the same place.

  1. Press Windows key + S, or select Start on the taskbar.
  2. Type cmd. Command Prompt appears as the best match.
  3. Press Enter to open a normal Command Prompt window.
  4. For an elevated window, right-click Command Prompt in the results and select Run as administrator.
  5. Select Yes on the User Account Control prompt, or enter an administrator password if Windows asks for one.

On Windows 11 22H2 and later, the window may open inside Windows Terminal rather than the classic console. The commands work the same way in both.

User Account Control consent prompt with Yes and No buttons
Select Yes here, or enter an administrator password instead if Windows shows a credential prompt. (Image: Microsoft)

Quick Comparison: Which Method Should You Use?

Method Keys or clicks Admin option Works when
Windows Search Win + S, type cmd, Enter Right-click > Run as administrator Windows is running normally
Run box Win + R, type cmd, Enter No, opens a normal window You want the fewest clicks
Win+X menu Win + X, then Terminal (Admin) Yes, opens Terminal elevated You need admin rights fast
Windows Terminal Arrow next to + > Command Prompt Only if Terminal itself is elevated You want tabs next to PowerShell
Task Manager Ctrl + Shift + Esc > Run new task Yes, tick the administrative privileges box The desktop or taskbar is frozen
Desktop shortcut Double-click the icon Right-click > Run as administrator You open it every day
Taskbar pin Click the icon, or Win + its number Right-click > Run as administrator You want a one-key launch
Advanced startup Settings > System > Recovery Runs with full rights in recovery Windows will not start or needs repair
Windows Setup Shift + F10 during setup Runs with full rights in setup You are installing Windows from USB
Taskbar jump list with Command Prompt listed and Run as administrator highlighted
Right-clicking a pinned icon offers Run as administrator, the same elevation route the taskbar pin method uses. (Image: Microsoft)

Before You Start: Normal vs. Administrator Command Prompt

Windows starts every app with a standard access token, even when you sign in as an administrator. An elevated Command Prompt runs with the full administrator token instead.

Open a normal window unless the command you plan to run asks for elevation. Tools such as DISKPART, sfc and manage-bde need the elevated one.

Normal Command Prompt Administrator Command Prompt
Integrity level Medium High
Prompt when opening None User Account Control consent or credential prompt
Can change system files and settings No Yes
Standard (non-admin) account Opens normally Needs an administrator's user name and password
Best for ipconfig, ping, dir, everyday tasks Disk, repair, service and policy commands

Method 1: Open Command Prompt with the Run Box

The Run dialog launches Command Prompt in two keystrokes plus the command name, which makes it the fastest keyboard route.

  1. Press Windows key + R to open the Run dialog.
  2. Type cmd in the Open box.
  3. Press Enter or select OK. A normal Command Prompt window opens in your user folder.

Add a switch to run a command as the window opens: cmd /k ipconfig runs ipconfig and keeps the window open, while cmd /c runs the command and then closes the window.

Method 2: Open Command Prompt from the Right-Click Start Menu

The Win+X menu (Microsoft calls it the Quick Link menu) no longer lists Command Prompt in Windows 11. It lists Terminal, which opens Command Prompt as a tab.

Windows 8 put Command Prompt (Admin) straight into this menu, as covered in this older Win+X shortcut tip. Windows 11 needs one extra step.

  1. Press Windows key + X, or right-click the Start button.
  2. Select Terminal for a normal session, or Terminal (Admin) for an elevated one, then select Yes on the prompt.
  3. In the Terminal window, select the down arrow next to the + tab button.
  4. Select Command Prompt. A new Command Prompt tab opens with the same rights as the window.

Terminal also assigns Ctrl + Shift + 1 to Ctrl + Shift + 9 to the profiles in that dropdown, in order. If Command Prompt is the second entry, Ctrl + Shift + 2 opens it directly.

Windows Terminal profile dropdown listing Command Prompt with its shortcut
If Command Prompt is the second profile listed, Ctrl+Shift+2 opens it directly, as shown here. (Image: Microsoft)

Method 3: Open Command Prompt from Windows Terminal

Windows Terminal is a host for several shells, and Command Prompt is one of its built-in profiles. Terminal opens PowerShell by default until you change that.

  1. Select Start, type terminal and open Terminal.
  2. Select the down arrow next to the + button on the tab bar.
  3. Select Command Prompt to open it in a new tab.
  4. To make every new Terminal window start in Command Prompt, open the dropdown again and select Settings.
  5. Select Startup, set Default profile to Command Prompt, and select Save.

Terminal cannot mix elevated and normal tabs in one window. To get an admin Command Prompt tab, start Terminal itself as administrator first.

Windows Terminal Startup settings with the Default profile menu
Change this Default profile menu to Command Prompt so every new Terminal window opens directly into it. (Image: Microsoft)

Method 4: Open Command Prompt from Task Manager

Task Manager is the route to use when the taskbar or Start menu stops responding, because it opens with a key combination and has its own run dialog.

  1. Press Ctrl + Shift + Esc to open Task Manager.
  2. Select Run new task (on older layouts it sits under the File menu).
  3. Type cmd.exe in the box.
  4. Tick the check box that creates the task with administrative privileges if you need an elevated window.
  5. Select OK. Command Prompt opens.

Microsoft uses this exact route in its own fix for blank taskbar icons, where Windows Explorer has to be closed first.

Method 5: Create a Desktop Shortcut for Command Prompt

A desktop shortcut gives you a double-click launch and a right-click route to an elevated window.

  1. Right-click an empty area of the desktop.
  2. Select New > Shortcut.
  3. In the location box, type cmd.exe and select Next.
  4. Type a name such as Command Prompt and select Finish.
  5. Double-click the new icon to open a normal window, or right-click it and select Run as administrator for an elevated one.

Method 6: Pin Command Prompt to Start or the Taskbar

Pinning puts Command Prompt one click away, and a taskbar pin also gets a keyboard shortcut.

  1. Select the Search box on the taskbar, or press Windows key + S.
  2. Type cmd.
  3. Right-click Command Prompt in the results.
  4. Select Pin to taskbar, or Pin to Start.
  5. If Command Prompt is already open, you can instead right-click its taskbar icon and select Pin to taskbar.

Windows key + number opens the app pinned at that taskbar position. If Command Prompt is the third pinned icon, Windows key + 3 opens it.

Method 7: Open Command Prompt from Advanced Startup

The Windows Recovery Environment has its own Command Prompt for repair work when Windows will not start or cannot fix itself while running.

  1. Open Settings and select System > Recovery.
  2. Next to Advanced startup, select Restart now. From the sign-in screen, you can instead hold Shift while you select Power > Restart.
  3. On the Choose an option screen, select Troubleshoot.
  4. Select Advanced options > Command Prompt.
  5. Enter your BitLocker recovery key if the drive is encrypted and Windows asks for it.

If Windows cannot start at all, turn the PC off during boot twice. The third start opens Automatic Repair, where Advanced options leads to the same menu.

Method 8: Open Command Prompt from Windows Setup

Windows installation media has a built-in Command Prompt, which is useful for preparing a disk before a clean install.

  1. Start the PC from a Windows 11 installation USB drive or DVD.
  2. Wait for the first Windows Setup screen to appear.
  3. Press Shift + F10. A Command Prompt window opens over Setup.
  4. Run the commands you need, for example diskpart, then type exit to close the window.
  5. Continue the installation in the Setup window.

How to clear CMD screen in Windows 11

Command Prompt keeps every command and result on screen until you clear it. The cls command wipes the window and returns an empty prompt.

cls

Clears all text in the Command Prompt window. It takes no options apart from /?, which shows its help.

You should see: The window goes blank and only the prompt, such as C:\Users\YourName>, remains at the top.

How to Tell If Command Prompt Is Running as Administrator

Windows marks each process with an integrity level. Standard sessions run at Medium and elevated ones at High, and whoami shows which one your window has.

  1. In the Command Prompt window, type whoami /groups and press Enter.
  2. Scroll to the Mandatory Label entry near the end of the list.
  3. High Mandatory Level means the window is elevated.
  4. Medium Mandatory Level means it is a normal window. Close it and reopen Command Prompt with Run as administrator.

Command Prompt vs. Windows Terminal in Windows 11

Command Prompt (cmd.exe) is the shell that runs your commands. Windows Terminal is a window that hosts shells, and since Windows 11 22H2 it is the default host for command-line apps.

Command Prompt (cmd.exe) Windows Terminal
What it is The Windows command interpreter A host app for Command Prompt, PowerShell and WSL
Tabs and panes No, one window per session Yes, tabs plus split panes
Runs PowerShell cmdlets No, only Windows commands Yes, in a PowerShell tab
Default opening shell Always Command Prompt PowerShell, changeable under Settings > Startup > Default profile
Classic console window Yes, when the default terminal is Windows Console Host No
Change which one opens Settings > Privacy & security > For developers > Terminal Terminal Settings > Startup > Default terminal application

Pick Windows Console Host as the default terminal if you want cmd to open in the old standalone window again.

Useful Commands to Try After Opening Command Prompt

Command What it does
help Lists the built-in Windows commands with a one-line description of each
ipconfig Shows your IP address, gateway and adapters; ipconfig /flushdns clears the DNS cache (full guide)
ping bing.com Tests whether your PC can reach a host on the network
whoami Prints the signed-in domain and user name
systeminfo Shows the Windows version, build, install date and hardware summary
tasklist Lists running processes with their process IDs
dir Lists the files and folders in the current folder
start notepad Launches a program from the prompt without blocking the window
exit Closes the Command Prompt window

CMD commands to manage Wireless Networks in Windows 11

The netsh wlan family manages Wi-Fi from the command line. Commands that show a saved key in clear text need an elevated window.

Command What it does
netsh wlan show profiles Lists every saved Wi-Fi network profile
netsh wlan show networks Lists the wireless networks currently in range
netsh wlan show interfaces Shows your Wi-Fi adapter, its state and the network it is connected to
netsh wlan connect name="HomeWiFi" Connects to a network using a saved profile
netsh wlan disconnect Disconnects the Wi-Fi adapter from its current network
netsh wlan delete profile name="OldWiFi" Removes a saved network so Windows stops joining it
netsh wlan export profile name="HomeWiFi" key=clear folder=. Saves a profile to an XML file in the current folder, with the key in plain text when run as administrator
netsh wlan show wlanreport Builds a report of recent Wi-Fi sessions and errors

Useful Tips After Opening Command Prompt

Tip How
Get help for any command Add /? after it, for example ipconfig /?
Switch to another drive and folder Type cd /d D:\Projects to change drive and folder in one step
Complete file and folder names Type the first letters and press Tab
Copy and paste Select text and press Ctrl + C; press Ctrl + V to paste
Select text with the keyboard Press Ctrl + M to enter Mark mode
Run several commands in a row Join them with && so each runs only if the previous one succeeded
Save output to a file Add > result.txt after a command
Leave the window Type exit and press Enter

Fix Command Prompt when it opens at startup or will not open

Command Prompt opens on startup by itself

An app or script registered to run at sign-in opens a console window.

  1. Select Start > Settings > Apps > Startup.
  2. Find entries you do not recognise and set their toggle to Off.
  3. Or right-click Start, select Task Manager, open the Startup apps tab, select the entry and choose Disable.
  4. Restart the PC and check whether the window still appears.
  5. If the entry is unknown and keeps coming back, run a full scan in Windows Security.

Command Prompt will not open and a message says a setting prevents it

The Prevent access to the command prompt policy is turned on for your account.

  1. On a work or school PC, ask your IT administrator, because the policy is set on purpose.
  2. On your own Windows 11 Pro PC, press Windows key + R, type gpedit.msc and press Enter.
  3. Go to User Configuration > Administrative Templates > System.
  4. Double-click Prevent access to the command prompt.
  5. Select Not Configured, then OK, and sign out and back in.

cmd opens in Windows Terminal instead of the classic window

Windows 11 22H2 and later use Windows Terminal as the default terminal application.

  1. Open Settings > Privacy & security > For developers.
  2. Find the Terminal setting.
  3. Choose Windows Console Host.
  4. Open Command Prompt again; it now starts in the standalone console window.

Run as administrator asks for a password

You are signed in with a standard account, so User Account Control shows a credential prompt.

  1. Enter the user name and password of an administrator account on the PC.
  2. Select Yes. The elevated window runs under that administrator's rights.
  3. If nobody knows an admin password, open a normal Command Prompt; commands that need elevation will not run.
User Account Control prompt asking for an admin password
This credential prompt appears when you are signed in with a standard account instead of an administrator. (Image: Microsoft)

Common Questions About Opening Command Prompt in Windows 11

How do I launch Command Prompt in Windows 11?

Select Start, type cmd and press Enter. For an elevated window, right-click Command Prompt in the search results and choose Run as administrator, then accept the User Account Control prompt. The Run box, the Win+X menu and Task Manager also open it.

How do I launch cmd from Run?

Press Windows key + R to open the Run dialog, type cmd in the Open box and press Enter. This opens a normal Command Prompt window in your user folder. Use the Start search or Task Manager instead when you need administrator rights.

How do I open the Run command window?

Press Windows key + R. The Run dialog opens with an Open box, ready for a command such as cmd, notepad or gpedit.msc. Type the name, press Enter, and Windows starts that program in its own window.

Is there a shortcut to launch Command Prompt?

Windows 11 has no dedicated key combination for Command Prompt. The closest are Windows key + R followed by cmd, or pinning Command Prompt to the taskbar and pressing Windows key plus its position number. Win+X opens Terminal, where Command Prompt is one tab away.

Where do I open Command Prompt in Windows 11?

Command Prompt lives in Windows Search: select Start and type cmd. It also opens from the Run dialog, as a profile inside Windows Terminal, from Task Manager's Run new task, and from Troubleshoot > Advanced options in the recovery environment.

Why does Command Prompt open on startup?

A program or script set to run at sign-in is opening a console window. Check Settings > Apps > Startup or the Startup apps tab in Task Manager, turn off entries you do not recognise, and run a full Windows Security scan if an unknown entry keeps returning.

How do I launch Command Prompt from Windows Setup?

Press Shift + F10 while Windows Setup is on screen after booting from the installation USB or DVD. A Command Prompt window opens over Setup, where you can run tools such as diskpart. Type exit to close it and continue installing.

How do I launch cmd with a command already running?

Use the /k or /c switch. cmd /k ipconfig opens Command Prompt, runs ipconfig and keeps the window open. cmd /c ipconfig runs the command and then closes the window, which suits shortcuts and scripts.

How do I launch a program from Command Prompt?

Type the program's name and press Enter if it is on the system path, for example notepad. The start command, such as start notepad, launches it and hands the prompt straight back, and start /max opens it in a maximised window.

How do I open Command Prompt as administrator without the mouse?

Press Windows key + X, then use the arrow keys to select Terminal (Admin) and press Enter. Accept the User Account Control prompt, then open a Command Prompt tab from the dropdown next to the plus button.

Best Method for Each Situation

Use Start search with cmd for everyday work and right-click it for Run as administrator; switch to Task Manager's Run new task when the desktop is frozen, and to Advanced startup when Windows will not start. Search is the one route that opens both a normal and an elevated window from the same place, while Task Manager and the recovery environment still work when the normal shell does not.

Philip Celasco

Philip is a Texas-based technology writer and IT administrator at Techdows.com with more than 10 years of experience creating practical content for everyday users and professionals. He specializes in web browsers, particularly Chromium-based platforms such as Google Chrome, Microsoft Edge, Brave, and Opera. Through his work as an IT administrator, Philip has hands-on experience managing devices, configuring browser policies, troubleshooting software and network issues, and helping people resolve problems that affect productivity and security. His articles are based on practical testing and real-world technical experience. He covers browser settings, extensions, performance problems, privacy controls, security features, and Windows troubleshooting. Outside work, Philip enjoys the quieter side of life in Texas and stepping away from the screen when he can. He has two kids, two cats and loves to play golf with his mother during the weekends.

Leave a Reply

Your email address will not be published. Required fields are marked *