What Is Command Prompt, How Do I Open and Use It [2023 Guide]
You may hear of the Command Prompt and know something basic about it. When it comes to managing disk partitions, resolving some disk errors, or executing some computing tests, do you know how to run Command Prompt and what command lines do you need for these issues?
It doesn't matter if you know quite little about it. Here on this page, we'll present you with a Windows beginner's guide to assist you in mastering Command Prompt on your own. Let's get started here:
In this article, you'll learn:
- What Is Command Prompt
- How to Open Command Prompt in Windows 11/10 or Older Windows OS
- The Most Important Commands for the Command prompt
- How to Master Command Prompt in Windows 11/10 to Manage Disk Partitions
- How to Use Command Prompt Commands to Manage Files in Windows
Note: This page is designed for Windows beginners. In case you encounter some errors while running Command Prompt command lines in Windows, please be very careful and cautious while tying the commands as presented on this page.
Let's see how to master Command Prompt like an expert in Windows computers on your own.
Accordingly, Command Prompt is an interpreter application that orders most Windows operating systems to execute different tasks via multiple command lines. Command Prompt is called Windows Command Processor, but it's more well-known as Command Shell or CMD prompt. And sometimes, people even prefer to call it cmd.exe. Sometimes, it's also referred to as MS-DOS, or "the DOS prompt'.
Command Prompt is widely used by Windows administrators and IT professionals, and, meanwhile, it's not very popular among Windows beginners. The reason is that Command Prompt has more than 280 commands, and each command line is designed for resolving different issues. Being the command lines complex and the process not easy to master, most Windows beginners rather turn to a Command Prompt alternative tool for help.
So can a Windows beginner master the Command Prompt and apply it to resolve some basic issues on Windows computers, hard drives, or even external storage devices? Sure. Follow the guidelines below, and let's see how to master Command Prompt on your PC now.
There are multiple ways that help to open Command Prompt in Windows computers. Here we'll show you five normal ways that work to bring up and launch the Command Prompt window immediately on your PC, let's see:
#1. Open Command Prompt with Windows + X Keys
Press Windows + X keys to open the Windows settings list, select or click "Command Prompt (Admin)". This will launch the Command Prompt in Windows 11/10/8.1/8.
#2. Open Command Prompt from Windows Menu or Start Menu
Click the Windows icon or Start icon, scroll down to find the Command Prompt from the list, then click "Command Prompt" to open it.
This way works to open Command Prompt in Windows 10/8.1/8 or even older systems.
#3. Open Command Prompt Through the Search Box
Press Windows + S keys to open the Search box, type cmd or command prompt into the search box, then right-click Command Prompt from the result.
And then right-click "Command Prompt", and select "Run as administrator". This will then open Command Prompt for you on Windows 11/10/8.1/8/7, etc., computers.
#4. Open Command Prompt from the Run Dialog
Press Windows + R keys, type cmd into the dialog, then click "OK". This will bring up the command prompt in all Windows operating systems.
#5. Open Command Prompt from the Task Manager
Press Ctrl + Alt + Del to open the Task Manager, then click "File" and select "Create a new task". Wait for the Run dialog to pop up, then type cmd and click "OK". This will also open up the Command Prompt windows on your PC.
Aside from the above five methods, there are still many workarounds that help you to quickly open and access Command Prompt on Windows PC. For more details, you may refer to:
How do you get a Command Prompt in Windows 10? All you need to do is find the proper way to get there. Windows 10 has opened you nearly 10 ways to access Command Prompt. Let's take a quick look.
As we introduced above, Microsoft added more than 280 commands for administrators and developers to run and execute multiple tasks on Windows computers through the Command Prompt.
However, to most Windows beginners, these commands are too many, and most of them can't remember all the command lines.
Here, we collected the most important and most frequently used commands for the Command Prompt that normal users can apply:
|Manage Hard Drive Partitions|
Aside from these three major types of command lines, there are still many other types of command lines. And you can refer to this page to learn the overall commands of Command Prompt: Windows Commands.
So how do a Windows beginner master the Command Prompt in Windows 11/10 or even older Windows systems? Follow the tutorials below, and you'll get a full guide that helps you to resolve multiple issues on your computers. Let's start.
When your hard drive or storage device is with different errors, you'll need to run different command lines to fix them. Here are how to use them on your PC:
CHKDSK is a command that aims to check and repair hard disk errors such as external hard drive inaccessible, etc., issues on Windows PC.
- Open Command Prompt through the five methods shown above and run it as administrator.
- Enter the following Command to check and fix file system errors on your internal or external hard drives: chkdsk E: /f /r /x.
Replace E: with the drive letter of your hard drive partitions.
The format command can help you change the file system format to FAT32, NTFS, or even exFAT. Sometimes, you can also use it to fix Raw drive or other unknown errors on your storage device, for example, to format USB using CMD:
- Open Command Prompt as Administrator with the five accesses listed above.
- Type the following command lines to format your target hard drive partitions:
- list disk
- select disk + number (Replace 2 with the number of your USB drive.)
- list volume
- select volume + number (Replace 10 with the volume number of your USB flash drive.)
- format fs=ntfs quick (You can also replace NTFS with FAT32 or exFAT.)
Remember to backup all the files in your target disk if you want to convert your disk to MBR or GPT using CMD. The reason is that converting disk via Command Prompt will need you to delete all existing partitions first, which will cause data loss.
You May also be interested in:
If you prefer a secure method, you can rely on EaseUS Partition Master with its disk conversion feature. It supports to convert disk to MBR or GPT without losing any data.
Here is how to convert disk via Command Prompt:
- Open CMD as Administrator.
- Type the command line here to convert your disk:
- select disk *
- convert mbr (or convert gpt)
When you need a quick and efficient way to clean up or erase your hard drives, the Clean or Clean all Command can fulfill your need. Note that the Clean Command will format and delete all existing partitions on your drive, while the Clean all Command will completely wipe everything on the disk.
Make sure that you are clear about which Command to apply on dealing with your disks, HDDs, SSDs, or even external devices. Here are the steps:
- Open CMD command prompt on your PC and run it as administrator.
- Type the following commands and hit Enter each time:
- list disk
- select disk *
- clean, or, clean all
When it comes to partitioning new hard drives, you can apply the Create command in the command prompt to create primary or logical partitions on your disk. Here are the steps:
- Open the Command Prompt tool in Windows as Administrator.
- Type the following command lines and hit Enter each time:
- list disk
- select disk * (Replace * with your selected disk.)
- list partition
- create partition primary size=1024 (1024MB is equal to 1 GB.) (You can also replace this command with "create partition extended size =*" and "create partition logical =*")
- assign letter=*
Bonus Tip: Manage and Partition Windows Disks with Command Prompt Alternative - EaseUS Partition Master
As you've seen above, the Command Prompt needs to input different command lines to execute and resolve different issues. Is it still a bit complex, right? Here, a reliable Command Prompt alternative tool - professional partition manager software - EaseUS Partition Master is capable of helping. You can simply partition, manage, and even optimize disk partition performance like an expert on your own.
Step 1. Launch EaseUS Partition Master to check for free space at the Partition Manager section.
- If your hard drive has unallocated space, jump to Step 3 to create partition.
- If the hard drive has no unallocated space, continue with Step 2.
Step 2. Shrink a disk partition to create unallocated space.
Right-click on the target drive partition with a lot free space and select "Resize/Move".
Drag either end of the partition rightwards or leftwards to shrink the partition size so as to get ample unallocated space. You can visually know how much space you've decreased in the "Partition size" area. Click "OK".
Click "Execute xx Task" and then "Apply" to save all the changes.
Go back to Partition Manager, there should be unallocated space appearing on the same disk and you can continue with Step 3 tocreate new partition on your.
Step 3. Create a new partition with unallocated space on the target hard drive.
Right-click on the unallocated space and choose "Create".
Customize the partiton size, partition drive letter, partition label, file system (NTFS, FAT32, EXT2/3/4, exFAT) and more in the Advanced Settings. Click "OK".
Finally, click "Execute * Task" and "Apply" to complete creating partition with the unallocated space on your disk. Repeat the steps to partition a hard drive and get many more partitions.
Alongside the partitioning commands in Command Prompt, some professionals may sometimes also run some commands to manage files and fix some file issues on their devices.
Here you are about how to run commands in Command Prompt to manage files in Windows.
Note that the Del command is designed to permanently remove files or content on your drive or device, bypassing the Recycle Bin. Therefore, in case you lose some essential files, be careful that you select the correct device to run the Command:
- Open Command Prompt as Administrator.
- Type one of the following listed command lines to delete unwanted files or folders on your drive:
- del /s C:\Users\Tim\Documents\Adobe\*.* (Replace C:\User\Tim\Documents\Adobe\*.* with any subfolders on your computer drive.)
- del C:\User\Tim\Downloads\*.exe (Replace C:\Uer\Time\Downloads\ with other paths, and replace *.exe with other file extensions, you'll be able to delete a file in other formats on other drives.)
You May Also Be Interested In:
Follow this guide and learn how to permanently delete files on PC or laptop and protect your data, whether you're getting rid of a computer, external hard drive, or USB stick.
Aside from deleting files or folders, Command Prompt also allows you to copy and move files from one drive to another local drive in Windows. See how to copy files using the command prompt here:
- Open Command Prompt as Administrator.
- Type one of the following command line and hit Enter to execute the file copying operation:
- copy c:\**.txt e: - This will copy all .txt files from the C drive to E.
(You can replace ** with the name of a specific file or change .txt with other file extensions to copy other types of files, such as .xls. Or, you can even replace c: or e: with other drive directories.)
- Xcopy C:\test D:\test /E /H /C /I - This will copy all files from C: drive to D: drive.
(You can replace C： and D: with other hard drive directories.)
- /E — Copies all subdirectories, including any that are empty.
- /H – Copies files that are hidden or have system file attributes.
- /C – Even if an error occurs, keep copying.
- /I – Always presume the destination is a folder if in question.
You May Also Be Interested In:
You may try copying and pasting on the general level, but it may fail if you have very large files to transfer. So here we highly recommend the most effortless way - EaseUS Todo PCTrans to transfer large files from one drive to another.
When your files are missing or hidden on your storage devices, you can apply this tool for help:
- Open CMD window as an administrator in Windows.
- Type the following commands and hit Enter each time to check and find hidden files:
- chkdsk E:/f
- attrib -h -r -s E:\*.* /s /d
(You can replace E: with the drive letter of your device. The Command here will help to fix device errors and find all missing or lost files in your storage device.)
You May Also Be Interested In:
When your files are missing from your USB drive or hard drive, you may wonder "Is there a command on the Windows command line that can list hidden folders?" Yes, there is a command to show hidden files.
Command Prompt Is Powerful in Manage Disks and Files, Be Careful While Using It
On this page, we explained what Command Prompt is, how to open the Command Prompt in Windows, and what people can do with its most important command lines. Also, we added detailed steps about how to run these commands to resolve and fix different issues.
Though it's powerful and efficient in running Command Prompt to execute some operations, it's still dangerous if you input some false commands. So please be very careful while running the commands.
If you prefer an alternative that fully replaces Command Prompt in managing disks, take EaseUS Partition Master for help.
Or, if the Command Prompt doesn't work on your PC, run its alternative tool to execute the task first. Then try to fix it by enabling CMD or performing System Restore to bring back Command Prompt to its original state. For a step-by-step guide, you can refer to Command Prompt Not Working in Windows 11/10 for help.
How Can We Help You
About the Author
Tracy joined in EaseUS in 2013 and has been working with EaseUS content team for over 7 years. Being enthusiastic in computing and technology, she writes tech how-to articles and share technical solutions about Windows & Mac data recovery, file/system backup and recovery, partition management and iOS/Android data recovery.
I love that the changes you make with EaseUS Partition Master Free aren't immediately applied to the disks. It makes it way easier to play out what will happen after you've made all the changes. I also think the overall look and feel of EaseUS Partition Master Free makes whatever you're doing with your computer's partitions easy. Read More
Partition Master Free can Resize, Move, Merge, Migrate, and Copy disks or partitions; convert to local, change label, defragment, check and explore partition; and much more. A premium upgrade adds free tech support and the ability to resize dynamic volumes. Read More
It won't hot image your drives or align them, but since it's coupled with a partition manager, it allows you do perform many tasks at once, instead of just cloning drives. You can move partitions around, resize them, defragment, and more, along with the other tools you'd expect from a cloning tool. Read More