极客和 IT 专业人员喜欢命令提示符 (CMD),(Command Prompt (CMD),)这是有充分理由的:它允许您轻松完成许多管理任务。我们认为最好列出我们知道的在Windows中打开(Windows)命令提示符(Command Prompt)的所有 14 种方法,以便您选择最适合自己的方法。知道如何以管理员身份打开CMD也很重要。(CMD)因此,请继续阅读并选择您最喜欢的打开命令提示符(Command Prompt)的方式:
1.如何使用搜索快速打开命令提示符(Command Prompt)
在Windows 11和Windows 10中,打开命令提示符(Command Prompt)的最快方法之一是使用搜索(search)。在Windows 11中,单击或点击任务栏上的搜索按钮,键入cmd,然后按Enter或单击/点击命令提示符(Command Prompt)结果。
使用搜索在Windows 11中打开CMD
如果您想以管理员身份启动命令提示符(Command Prompt),请使用搜索面板右侧的“以管理员身份运行”链接。("Run as administrator" )或者,您也可以在命令提示符(Command Prompt )搜索结果上右键单击(或按住,如果您使用触摸屏),然后选择“以管理员身份运行”。("Run as administrator.")
如何在Windows 11中以管理员身份打开命令提示符(Command Prompt)
如果您使用的是Windows 10,请在任务栏上的搜索字段中输入cmd。然后,按键盘上的Enter或单击/点击命令提示符(Command Prompt)结果。
搜索 cmd 以在Windows 10中打开(Windows 10)命令提示符(Command Prompt)
就像在 Windows 10 中一样,以管理员身份启动命令提示符(Command Prompt),而不是按Enter或单击Open,单击或点击搜索面板右侧的“以管理员身份运行”链接。("Run as administrator")或者,右键单击(按住触摸屏)命令提示符(Command Prompt)结果,然后单击/点击“以管理员身份运行”。("Run as administrator.")
(Run)在Windows 10中以管理员身份运行命令提示符(Command Prompt)
2.如何从开始菜单打开(Start Menu)命令提示符(Command Prompt)
在Windows 11 PC 上,您还可以从“开始”菜单启动(Start Menu)命令提示符(Command Prompt)。打开开始菜单(Start Menu),转到所有应用程序(All apps)并向下滚动,直到找到Windows 工具(Windows Tools)快捷方式。然后,单击或点击它。
Windows 11开始菜单(Start Menu)中的Windows 工具(Windows Tools)快捷方式
在Windows 工具(Windows Tools)窗口中,有一个命令提示符(Command Prompt)快捷方式。双击或双击它,您最喜欢的命令行应用程序就会打开。
(Command Prompt)Windows 工具中的(Windows Tools)命令提示符快捷方式
如果要以管理员身份运行命令提示符(Command Prompt),请右键单击或按住其快捷方式,单击或点击“以管理员身份运行”。("Run as administrator.")
从Windows 工具(Windows Tools)以管理员身份运行CMD
如果您使用的是 Windows 10 PC,请打开“开始”菜单(Start Menu)并转到“ Windows 系统( Windows System)快捷方式”文件夹。在那里,您将找到一个命令提示符(Command Prompt)快捷方式:单击或点击它以打开CMD。
如何从Windows 10的开始菜单打开(Start Menu)命令提示符(Command Prompt)
如果要以管理员身份启动命令提示符(Command Prompt),请右键单击或按住快捷方式,然后打开更多(More)子菜单,最后单击或点击“以管理员身份运行”。("Run as administrator.")
或者,只需按住Ctrl和Shift键,然后单击或点击命令提示符(Command Prompt)快捷方式,以管理员身份启动CMD 。
命令提示符在(Command Prompt Run)Windows 10的“(Windows 10)开始”菜单(Start Menu)中以管理员身份运行
3.如何从运行(Run)窗口打开命令提示符(Command Prompt)
在Windows 11和Windows 10中打开命令提示符(Command Prompt)的最快方法之一是通过“运行”窗口(Run window)。按键盘上的Win + R键,然后键入cmd,然后按键盘上的Enter或单击/点击OK。
(Start Command Prompt)使用运行窗口(Run Window)启动命令提示符
4.如何在终端中打开(Terminal)命令提示符(Command Prompt)
终端(Terminal)(Terminal)应用程序提供了另一种在 Windows中打开CMD的简便方法。在 Windows 11 中,终端(Terminal)是操作系统的一部分,因此您可以简单地启动它(launch it)。但是,如果您使用的是Windows 10,则首先必须下载并安装它(download and install it),然后才能打开终端(Terminal)。无论哪种方式,当您启动Windows Terminal时,它都会加载一个PowerShell选项卡。但是,您也可以在(open CMD in the Terminal)终端(Terminal)中打开CMD ,方法是单击形状像向下插入符号的“打开新选项卡”按钮,然后选择("Open a new tab")命令提示符(Command Prompt)从菜单中。或者,您也可以通过同时按键盘上的Ctrl + Shift + 2键在Windows 终端中打开(Windows Terminal)命令提示符(Command Prompt)选项卡。
在 Windows 终端中打开 CMD
5.在您的桌面或您想要的任何文件夹中创建命令提示符快捷方式(Command Prompt)
如果您更喜欢使用快捷方式,那么您应该创建(create a shortcut)命令提示符(Command Prompt)的快捷方式。右键单击或按住桌面或任何其他文件夹上的空白区域,转到上下文菜单中的新建(New),然后单击或点击快捷方式(Shortcut)。
创建一个新的桌面快捷方式
接下来,在Create Shortcut向导中,将新的快捷方式指向cmd,为其命名(如命令提示符(Command Prompt)或Old-School Shell :),然后保存。
创建命令提示符快捷方式
6.使用我们已经制作的命令提示符(Command Prompt)快捷方式
或者,您可以下载我们的快捷方式集合并使用我们创建的内容:Download the largest collection of Windows desktop shortcuts for free!. 在这个包中,还有许多其他有用的快捷方式可供下载和使用。如果要以管理员身份运行快捷方式,请右键单击(如果使用触摸屏,请按住它),然后单击或点击上下文菜单中的“以管理员身份运行”("Run as administrator")选项。
(Run)以管理员身份运行命令提示符(Command Prompt)快捷方式
7.将命令提示符(Pin Command Prompt)固定到任务栏或开始菜单(Start Menu)
如果您希望有一个干净的桌面,您可能更愿意将命令提示符(Command Prompt)固定到任务栏或开始菜单(Start Menu)。在Windows 11或Windows 10中,搜索CMD,然后在搜索框的右侧选择“Pin to Start”,如果您想在Start Menu的Pinned部分显示命令提示符(Command Prompt)。如果您希望将其放在任务栏上,请单击或点击“固定到任务栏”。("Pin to taskbar.")
固定(Pin)到开始(Start)和固定(Pin)到任务栏:Windows中的命令提示符(Command Prompt)
从现在开始,使用您固定的快捷方式打开命令提示符(Command Prompt)。此外,如果您想以管理员身份运行命令提示符,请使用固定在“(Command Prompt)开始”菜单(Start Menu)或任务栏上的快捷方式上的右键菜单,然后单击/点击“以管理员身份运行”("Run as administrator")选项。
(Run Command Prompt)使用其固定快捷方式以管理员身份运行命令提示符
8.如何从文件资源管理器(File Explorer)的地址栏打开命令提示符(Command Prompt)
您还可以使用文件资源管理器(File Explorer. )中的地址栏打开命令提示符。(Command Prompt)您所要做的就是在地址栏中输入cmd并按Enter。然后,使用当前文件夹的路径立即打开一个命令提示符实例。(Command Prompt)
从文件资源管理器(File Explorer)打开命令提示符(Command Prompt)
有关更多详细信息,请阅读本教程:如何从 Windows 的文件资源管理器运行命令(How to run commands from Windows’ File Explorer)。不幸的是,您无法使用此方法以管理员身份打开命令提示符。(Command Prompt)
9.使用其 cmd.exe 可执行文件打开命令提示符(Command Prompt)
您还可以使用其cmd.exe文件打开命令提示符。(Command Prompt)打开File Explorer,导航到Windows分区,打开Windows文件夹,然后输入System32。在那里,您将找到cmd.exe -命令提示符(Command Prompt)使用的可执行文件。
通过运行 cmd.exe打开命令提示符(Command Prompt)
此外,以管理员身份打开它的最简单方法是右键单击(或按住它,如果您有触摸屏),然后单击/点击上下文菜单中的“以管理员身份运行”("Run as administrator")选项。
以管理员身份运行 cmd.exe
10.从任务管理器打开(Task Manager)命令提示符(Command Prompt)
您可以使用任务管理器(Task Manager)打开命令提示符(Command Prompt)。启动(Launch Task Manager)任务管理器(Task Manager)(快速方法是按Ctrl + Shift + Esc)。如果您获得任务管理器(Task Manager)的紧凑视图(the compact view),请先按窗口左下角的更多详细信息。(More details)打开“文件(File)”菜单,选择“运行新任务("Run new task)”,然后在“创建新任务("Create new task)”窗口中键入cmd 。在键盘上按Enter或按OK按钮,命令提示符(Command Prompt)将打开。
使用任务管理器(Task Manager)启动命令提示符(Command Prompt)
此外,如果您想以管理员身份运行命令提示符(Command Prompt),请在按Enter键或OK按钮之前选中“使用管理权限创建此任务”复选框。("Create this task with administrative privileges")
(Start Command Prompt)从任务管理器(Task Manager)以管理员权限启动命令提示符
11. 让Cortana打开命令提示符(Command Prompt)
如果你愿意,你也可以告诉Cortana你想做什么。在Windows 11或Windows 10中,使用她的快捷方式或说“Cortana”打开Cortana(如果您允许她在您呼叫她时随时接听)。然后,键入或说“打开命令提示符”。("open Command Prompt.")
要求Cortana打开命令提示符(Command Prompt)
只需片刻,Cortana就会明白你想要什么,并立即启动命令提示符(Command Prompt)。不幸的是,没有可用于要求Cortana以管理员身份启动命令提示符的命令。(Command Prompt)
12. 如何在启动 Windows 11 或 Windows 10 时打开命令提示符(Command Prompt)(使用高级启动(Advanced Startup) 选项(Options))
如果您需要在命令提示符(Command Prompt)中运行高级命令并且您的Windows PC 不再正常工作,您可能需要在操作系统完全加载之前在启动时打开CMD 。为此,请按照本教程中的步骤操作:Windows 无法启动时打开命令提示符的 5 种方法(5 ways to open Command Prompt when Windows doesn't boot)。
命令提示符已打开
然后,您可以使用CMD执行任何您想做的事情,包括执行高级任务,例如使用diskpart进行(diskpart)引导修复(boot repairs)或分区管理。
13. 如何在安装Windows 11或 Windows 10时打开命令提示符(Command Prompt)
即使您的计算机上未安装Windows 11或Windows 10,我们还有另一种打开命令提示符的巧妙方法。(Command Prompt)当您的Windows损坏且无法正常启动时,它也可以工作。使用Windows 11或Windows 10 安装媒体( Windows 10 installation media)启动您的计算机(boot your computer)或设备。当设置向导出现时,同时按键盘上的Shift + F10键打开命令提示符(Command Prompt)。
Press Shift + F10安装 Windows 时按 Shift + F10打开命令提示符(Command Prompt)
就这么简单!🙂
14. 如何从Microsoft Edge打开(Microsoft Edge)命令提示符(Command Prompt)
在 Windows 中启动命令提示符(Command Prompt)的一种麻烦且不推荐的方法是使用Microsoft Edge网络浏览器来执行此操作。启动Microsoft Edge并在地址栏中输入此命令:file://C:/Windows/System32/cmd.exe。然后,按Enter。
Microsoft Edge中命令提示符(Command Prompt)的URL
在打开的下载对话框中,单击或点击“运行”(Run)按钮。
从Microsoft Edge打开命令提示符(Command Prompt)
此方法仅使用标准用户权限打开命令提示符(Command Prompt)窗口,而不是管理权限。此外,CMD的起始路径是(CMD)Windows分配给您的用户帐户的临时 Internet 文件位置。
命令提示符(Command Prompt)在临时位置打开
这就是全部了!
你喜欢如何打开命令提示符(Command Prompt)?
这些是我们所知道的在Windows 11和Windows 10中启动(Windows 10)命令提示符(Command Prompt )的所有方式。它可以帮助您找到正确的打开方式,具体取决于您在 Windows PC 上执行的操作。如果您知道其他方法,请不要犹豫,在下面的评论中分享它们。此外,如果您正在寻找一些关于如何使用命令提示符(Command Prompt)的好文章,请查看以下我们的建议。
How to open Command Prompt (14 ways) -
Geeks and IT professionals love the Command Prompt (CMD), and for a good reason: it allows you to do many administrative tasks with ease. We think that it is a good idea to make a list of all the fourteen methods we know for opening Command Prompt in Windows so that you can choose what suits you best. Knowing how to open CMD as an administrator is also important. Therefore, read on and choose your favorite way to open Command Prompt:
1. How to open Command Prompt fast using search
Both in Windows 11 and Windows 10, one of the fastest ways to open Command Prompt is to use search. In Windows 11, click or tap the search button on the taskbar, type cmd, and press Enter or click/tap on the Command Prompt result.
Opening CMD in Windows 11 using search
If you want to launch Command Prompt as administrator, use the "Run as administrator" link from the right side of the search panel. Alternatively, you can also right-click (or press and hold if you use a touchscreen) on the Command Prompt search result and then choose "Run as administrator."
How to open Command Prompt as admin in Windows 11
If you’re using Windows 10, inside the search field on the taskbar, enter cmd. Then, press Enter on your keyboard or click/tap on the Command Prompt result.
Search for cmd to open Command Prompt in Windows 10
Just like in Windows 10, to launch Command Prompt as admin, instead of pressing Enter or clicking Open, click or tap on the "Run as administrator" link from the right side of the search panel. Or, right-click (press and hold on a touchscreen) on the Command Prompt result, and then click/tap on "Run as administrator."
Run as administrator the Command Prompt in Windows 10
2. How to open Command Prompt from the Start Menu
On a Windows 11 PC, you can also launch Command Prompt from the Start Menu. Open the Start Menu, go to All apps and scroll down until you find the Windows Tools shortcut. Then, click or tap on it.
The Windows Tools shortcut from Windows 11's Start Menu
In the Windows Tools window, there’s a Command Prompt shortcut. Double-click or double-tap on it, and your favorite command-line app opens.
Command Prompt shortcut in Windows Tools
If you want to run Command Prompt as an administrator, right-click or press and hold on its shortcut, click or tap "Run as administrator."
Running CMD as admin from Windows Tools
If you’re using a Windows 10 PC, open the Start Menu and go to the Windows System shortcuts folder. There, you're going to find a Command Prompt shortcut: click or tap on it to open CMD.
How to open Command Prompt from Windows 10's Start Menu
If you want to launch Command Prompt as an admin, right-click or press and hold the shortcut, then open the More sub-menu and finally, click or tap "Run as administrator."
Or, just hold the Ctrl and Shift keys pressed and click or tap on the Command Prompt shortcut to launch CMD as admin.
Command Prompt Run as administrator in the Start Menu from Windows 10
3. How to open Command Prompt from the Run window
One of the quickest ways to open Command Prompt in Windows 11 as well as Windows 10 is via the Run window. Press the Win + R keys on your keyboard, then type cmd, and press Enter on your keyboard or click/tap OK.
Start Command Prompt using the Run Window
4. How to open Command Prompt in the Terminal
The Terminal app offers another easy way to open CMD in Windows. In Windows 11, the Terminal is part of the operating system, so you can simply launch it. However, if you’re using Windows 10, you first have to download and install it, and only then can you open the Terminal. Either way, when you start the Windows Terminal, it loads a PowerShell tab. But, you can also open CMD in the Terminal by clicking the "Open a new tab" button shaped like a downward pointing caret and then selecting Command Prompt from the menu. Alternatively, you can also open a Command Prompt tab in Windows Terminal by simultaneously pressing the Ctrl + Shift + 2 keys on your keyboard.
Open CMD in Windows Terminal
5. Create a Command Prompt shortcut on your desktop or in any folder you want
If you prefer using shortcuts, then you should create a shortcut to the Command Prompt. Right-click or press and hold on an empty space on your desktop or any other folder, go to New in the contextual menu, and click or tap on Shortcut.
Create a new desktop shortcut
Next, in the Create Shortcut wizard, point your new shortcut to cmd, give it a name (like Command Prompt or Old-School Shell :), and save it.
Create a Command Prompt shortcut
6. Use our already-made Command Prompt shortcut
Alternatively, you can download our collection of shortcuts and use what we have created: Download the largest collection of Windows desktop shortcuts for free!. In this pack, there are also plenty of other useful shortcuts to download and use. If you want to run the shortcut as administrator, right-click (or press and hold on it if you use a touchscreen), and then click or tap the "Run as administrator" option from the contextual menu.
Run as administrator a Command Prompt shortcut
7. Pin Command Prompt to your taskbar or Start Menu
If you would rather have a clean desktop, you might prefer to pin the Command Prompt to the taskbar or to the Start Menu. In either Windows 11 or Windows 10, search for CMD, and, on the right of the search box, select "Pin to Start" if you want Command Prompt on the Pinned section of your Start Menu. If you’d rather have it on your taskbar, click or tap on "Pin to taskbar."
Pin to Start and Pin to taskbar: Command Prompt in Windows
From now on, use the shortcut that you have pinned to open Command Prompt. Also, if you want to run Command Prompt as administrator, use the right-click menu on the shortcut pinned on your Start Menu or taskbar, and click/tap the "Run as administrator" option from it.
Run Command Prompt as administrator using its pinned shortcut
8. How to open Command Prompt from File Explorer's address bar
You can also open Command Prompt using the address bar from File Explorer. All you have to do is type cmd in the address bar and press Enter. Then, a Command Prompt instance opens immediately, using the path of the current folder.
Open Command Prompt from File Explorer
For more details, read this tutorial: How to run commands from Windows’ File Explorer. Unfortunately, you cannot open Command Prompt as an administrator using this method.
9. Open Command Prompt using its cmd.exe executable file
You can also open Command Prompt using its cmd.exe file. Open File Explorer, navigate to the Windows partition, open the Windows folder, and then enter System32. There, you're going to find cmd.exe - the executable file used by Command Prompt.
Open Command Prompt by running cmd.exe
Also, the easiest way to open it as an administrator is to right-click (or press and hold it, if you have a touchscreen) and then click/tap on the "Run as administrator" option from the contextual menu.
Run cmd.exe as administrator
10. Open Command Prompt from the Task Manager
You can open Command Prompt using the Task Manager. Launch Task Manager (a quick way is by pressing Ctrl + Shift + Esc). If you get the compact view of the Task Manager, first press More details in the bottom-left corner of the window. Open the File menu, select "Run new task," and type cmd in the "Create new task" window. Hit Enter on your keyboard or press the OK button, and the Command Prompt opens.
Start the Command Prompt using Task Manager
Also, if you want to run Command Prompt as administrator, mark the checkbox "Create this task with administrative privileges" before you press the Enter key or the OK button.
Start Command Prompt with administrator privileges from Task Manager
11. Ask Cortana to open Command Prompt
If you want, you can also tell Cortana what you want to do. In either Windows 11 or Windows 10, open Cortana using her shortcut or by saying "Cortana" (if you enabled her to answer anytime you call for her). Then, type or say "open Command Prompt."
Asking Cortana to open Command Prompt
In just a moment, Cortana understands what you want and immediately launches the Command Prompt. Unfortunately, there is no command you could use to ask Cortana to launch Command Prompt as administrator.
12. How to open Command Prompt when you boot Windows 11 or Windows 10 (using the Advanced Startup Options)
If you need to run advanced commands in Command Prompt and your Windows PC no longer works properly, you might need a way to open CMD at boot before the operating system loads itself completely. To do that, follow the steps from this tutorial: 5 ways to open Command Prompt when Windows doesn't boot.
The Command Prompt is opened
You can then use CMD to do anything you want, including performing advanced tasks such as boot repairs or partition management with diskpart, for instance.
13. How to open Command Prompt while installing Windows 11 or Windows 10
We have another neat method of opening Command Prompt even when Windows 11 or Windows 10 is not installed on your computer. It also works when your Windows is corrupted and can't boot properly. Use a Windows 11 or Windows 10 installation media to boot your computer or device. When the setup wizard shows up, simultaneously press the Shift + F10 keys on your keyboard to open Command Prompt.
Press Shift + F10 to open Command Prompt when installing Windows
It's as simple as that! 🙂
14. How to open the Command Prompt from Microsoft Edge
A cumbersome and not recommended method to launch Command Prompt in Windows is to use the Microsoft Edge web browser to do it. Launch Microsoft Edge and enter this command in the address bar: file://C:/Windows/System32/cmd.exe. Then, press Enter.
The URL for Command Prompt in Microsoft Edge
In the download dialog that opens up, click or tap the Run button.
Open Command Prompt from Microsoft Edge
This method only opens Command Prompt windows with standard user rights, not administrative privileges. Furthermore, the starting path of CMD is the temporary internet files location assigned by Windows to your user account.
Command Prompt is opened in a temporary location
That was all!
How do you like to open the Command Prompt?
These are all the ways we know for launching Command Prompt in Windows 11 and Windows 10. It can help you find the right way to open it, depending on what you are doing on your Windows PC. If you know other methods, don’t hesitate to share them in a comment below. Also, if you are looking for some good articles on how to use the Command Prompt, check our recommendations below.