Command Prompt gives you direct control over Windows through typed commands, streamlining tasks as opposed to navigating through menus. Learn how to open Command Prompt and run basic commands that make it useful for everyday tasks.
![[Featured image]: Two people look at a monitor as they use a computer with the command prompt tool.](https://d3njjcbhbojbot.cloudfront.net/api/utilities/v1/imageproxy/https://images.ctfassets.net/wp1lcwdav1p1/41yLvq7M24oT1odGXWXzkI/cb98f2cc1135b9671e5e46a7779a671e/GettyImages-2246080915-converted-from-jpg.webp?w=1500&h=680&q=60&fit=fill&f=faces&fm=jpg&fl=progressive&auto=format%2Ccompress&dpr=1&w=1000)
Command Prompt is a Windows tool that lets you run typed commands to manage files, check your network, and troubleshoot problems without opening the graphical interface.
You can open Command Prompt from the Start menu, the Run dialog box, or open it as an administrator when a task calls for elevated permissions.
You'll use basic Command Prompt commands such as cd, dir, ipconfig, and ping for navigation, file checks, and quick network troubleshooting during everyday work.
Command Prompt is available in both Windows 10 and Windows 11. You can learn how to open Command Prompt, run basic commands, and troubleshoot common issues in the following article. If you're ready to start building software engineering skills, enroll in the IBM DevOps and Software Engineering Professional Certificate to explore DevOps practices and software engineering concepts.
Command Prompt, often shortened to CMD, is a Windows program built around a single idea: instead of pointing and clicking, you tell your computer what to do by typing. Every line you enter is read as an instruction and carried out on the spot. Sitting alongside the familiar desktop and its menus, CMD acts as a direct line into your system for the kinds of tasks that benefit from typed-in precision [1].
People typically use the desktop with its icons and menus to complete everyday tasks, but the Command Prompt tool becomes a better choice when you want more control. If you write code or work as a power user, you likely favor it because typed commands let you work more directly with Windows, and some tasks are simply quicker to handle through a line of text.
You can open Command Prompt from the Start menu, the Run dialog box, or with administrator privileges when a task needs elevated permissions. On Windows 11, Command Prompt may open inside Windows Terminal, Microsoft's modern host application for command-line tools [2]. The commands below work the same way in both applications.
Open from the Run dialog box: Hold down Windows + R to bring up the Run dialog box. Type cmd and press Enter.
Open from the Start menu: Open Start. Type command prompt or cmd and select Command Prompt from the results.
Open as an administrator: Open Start. Type command prompt or cmd and select Run as administrator.
Learn more: What Is a Superuser?
A handful of basic commands handle the core tasks you'll perform at the command line, such as navigating folders, viewing files, checking network settings, and learning how other commands work. Depending on the command, you may also need to provide additional information, such as a file path or IP address, to tell Windows what action to perform [3].
You'll use cd whenever the file or folder you want isn't in your current location. To use this, type cd followed by the path you want to enter. For example, type cd\windows\system32 to drop into the System32 folder nested inside Windows.
Run dir to see what's sitting in your current folder, with file sizes and last-modified dates included. At the C:\ prompt, dir gives you a look at everything on your C: drive. Use dir when you want to see what files and folders are available before opening, copying, or deleting anything.
Running ipconfig pulls up the configuration of your network adapter, with values like your IP address, subnet mask, and default gateway laid out for you. It is the quickest way to confirm how your machine is talking to the network and often one of the first commands to try when you're troubleshooting a network or internet connection.
Use ping to test whether your computer can communicate with another device on the network. You give it an address, it sends a short signal over, and the device on the other end responds. Running ping 192.168.0.2, for example, tests the connection to that specific address and shows the reply. If a website won't load or another computer isn't responding, ping can help you determine whether your computer can reach it.
To learn what a command does and what extra options it accepts, type the command name followed by /?. For example, running ipconfig /? pulls up a breakdown of every command-line switch you can pair with ipconfig, along with a short description of each [4].
To use Command Prompt, type a command and press Enter. You can combine different commands to manage files, troubleshoot network problems, gather system information, and perform other tasks without using the Windows graphical interface.
File and folder tasks: Create folders with mkdir, remove a file with del, copy files with copy, or move them to a different location with move. The * and ? characters work as wildcards, letting a single command act on every file matching a pattern.
Network troubleshooting: When something is off with your connection, you can use tracert to trace each hop a request makes between your computer and a destination, nslookup to check the DNS records behind a domain name, and netstat to reveal which network connections are currently open on your machine.
Process and service management: Use tasklist to pull up every process currently running, taskkill to shut down a process by name or ID, and sc to start, stop, and configure background services. The start command launches a program straight from the prompt for you.
Backups and system information: Use xcopy to duplicate files and folders to a chosen destination, and robocopy if you need to do the same job with large transfers or mirrored backups. You can use wbadmin to save and restore system images, and systeminfo to print a snapshot of your hardware, operating system, and configuration details.
Scripts and automation: Save repetitive sequences of commands into batch files, which run as a single script. For more advanced automation, turn to PowerShell or VBScript, and pair either with Task Scheduler to run your scripts on a timer or in response to specific system events.
Disk and hardware tools: For storage work, use diskpart to manage disks and partitions, format to prepare a drive for use, and chkdsk to look for errors and fix what it can. Devcon, a separate utility you install, gives you command-line control over hardware drivers and device profiles.
Type help at the command prompt and press Enter to see the commands CMD recognizes, along with a short description of what each one does. To learn more about a specific command, type its name followed by /? (for example, dir /?) to view its available command-line switches, or specific command modifiers, and how to use them. This lets you explore what CMD can do without leaving the Command Prompt window [4].
Command Prompt includes a few built-in shortcuts that can help you work faster once you're comfortable with the basics. Knowing these can save you time typing out full commands or navigating the window.
↑ / ↓ arrows: Cycle through the commands you've already typed in this window, so you don't have to retype something you just ran.
Ctrl + C: Stop a command that's currently running. This shortcut stops the command and does not undo an action.
Tab: Type the first few letters of a file name and press Tab to autocomplete it. If more than one item matches, keep pressing Tab to cycle through the available options until you reach the one you want.
Subscribe to our weekly LinkedIn newsletter, Career Chat, for industry updates, tips, and trends. Or if you want to learn more about software engineering, check out these free resources:
Watch on YouTube: Software Engineering Roadmap for Beginners (With NO Experience)
Read our Career Chat issue: 5 Popular Software Engineering Certifications
Hear from an insider: Meet the Software Engineer Looking to Be a More Competitive Job Candidate
Accelerate your career growth with a Coursera Plus subscription. When you enroll in either the monthly or annual option, you’ll get access to over 10,000 courses.
Dell. “Windows Command Prompt Information and How to Use Its Commands List, https://www.dell.com/support/kbdoc/en-us/000130703/the-command-prompt-what-it-is-and-how-to-use-it-on-a-dell-system/.” Accessed July 22, 2026.
Microsoft Learn. “What is Windows Terminal?, https://learn.microsoft.com/en-us/windows/terminal/.” Accessed July 22, 2026.
Microsoft Learn. “Windows Commands, https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/windows-commands/.” Accessed July 22, 2026.
Microsoft Support. “Command-line switches for Microsoft Office products, https://support.microsoft.com/en-us/office/lifecycle/command-line-switches-for-microsoft-office-products/.” Accessed July 22, 2026.
Editorial Team
Coursera’s editorial team is comprised of highly experienced professional editors, writers, and fact...
This content has been made available for informational purposes only. Learners are advised to conduct additional research to ensure that courses and other credentials pursued meet their personal, professional, and financial goals.