How to repair Windows 10 using command prompt?
Jul 13, 2025 am 02:28 AMThe methods to fix Windows 10 problems using the command prompt are as follows: 1. When fixing startup problems, enter the command prompt from the installation media to run the bootrec /fixmbr, bootrec /fixboot and bootrec /rebuildbcd commands in turn; 2. When checking and repairing system files, run the sfc /scannow or DISM /Online /Cleanup-Image /RestoreHealth commands as administrator; 3. When repairing hard disk errors, enter chkdsk C: /f /r (C: is the system disk) at the command prompt and confirm restart when prompted. These steps can solve common problems such as boot corruption, system file exceptions and disk errors respectively. Before operation, you need to understand the functions of each command to prevent incorrect operation.
There are many ways to fix Windows 10, and using Command Prompt is one of the more direct and effective ways. Especially when the system cannot start normally, entering the recovery environment running command prompt through the installation media can solve many key problems.

Use Command Prompt to fix startup issues
If your computer does not enter the system properly, the most common problem is that the boot record is damaged or lost. At this time, you can use the following command to fix it:

- Insert the Windows installation USB disk and boot from the USB disk
- Go to Troubleshooting > Advanced Options > Command Prompt
- Run the following commands in turn:
-
bootrec /fixmbr
-
bootrec /fixboot
-
bootrec /rebuildbcd
-
These commands will repair the main boot record, boot sector, and rebuild the BCD (boot configuration data). After completion, enter exit
and restart the computer.
Check and repair system files
If the system can barely start but runs unstable, it may be that the system files are corrupted. You can use the system's own tools to scan and repair:

- Open a command prompt (run as administrator)
- Enter one of the following two commands:
-
sfc /scannow
: Scan and try to repair protected system files - If the above command is useless, you can try a more thorough check:
DISM /Online /Cleanup-Image /RestoreHealth
-
These two commands may take a certain amount of time to complete, so do not close the window during execution. After completion, it is recommended to restart it once to see the effect.
Fix hard drive errors
Sometimes bad channels or file system errors in hard disk can also cause system exceptions. You can run the disk checking tool via the command prompt to troubleshoot:
Enter:
chkdsk C: /f /r
(Note: C: It is your system disk, please replace it if it is not)The system will prompt you whether to check the volume next time you start it up, enter
Y
to confirmAfter restarting, the system will automatically check the disk
This process will run automatically once when the system is idle, which is suitable for handling some non-physical hard disk errors.
Basically these common operations. Although it seems that there are many steps, each step is not complicated. As long as it is executed in order, many basic problems can be solved. But the same thing is true. It is best to confirm that you understand the role of each command before starting a move to avoid causing more trouble by mistake.
The above is the detailed content of How to repair Windows 10 using command prompt?. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Windows 11 is capable of running a large number of file types with or without external third-party applications. Not only does it allow you to perform numerous tasks from the comfort of your PC, but it also ensures that you can take advantage of your PC's raw capabilities. Today, we'll take a look at a complex file type—jar—and tell you how to open it on your Windows 11 or Windows 10 PC. What is a jar file? jar is an archive package format that may or may not contain an executable Java program. These archives can contain Java applications or source code, which can then be used to compile and run applications without having to write separate code for each application. You can use various methods

What is a CAB file? The extension of CAB file is .cab, which is the abbreviation of WindowsCabinet file. This is a compressed file typically used to compress software installation packages such as device drivers or update files. CAB files support lossless compression, which makes the format ideal for compressing files where it is critical that the files can be extracted accurately, such as drivers and other updates. How to Install a CAB File on Windows 11 Using Command Prompt There are multiple ways to install a CAB file on Windows 11. One of the methods is to use command prompt to extract and install the files. You can also use the newer Windows PowerShell

Cheating has always been a big problem in online FPS games, even if Valorant didn't exist. It can ruin the gaming experience and reduce player interest in the game. Valorant has tried to overcome this shortcoming since its early days with its own RiotVanguard protection system. You need to restart the system after installing the game once. This is completely normal and the Vanguard system will start automatically. However, if you restart your system and still see "Your game requires a system restart to play. Please restart your computer." Leave a message on the home page? Many users have encountered this problem, so don’t worry. Follow these fixes for a quick solution. Fix 1 – Don’t quit Pioneer after restarting your computer

Some users are encountering the error “Application Error 0xc0000906” while trying to run the application on their systems and they are unable to proceed. A single application or multiple applications on your system may encounter this error. This may be due to file corruption, caching issues, use of third-party antivirus software that may block software applications, etc. In this article, we have some solutions that can help users eliminate the error. Try executing the command to scan system files and disable antivirus software as described below. So let’s get started! Method 1: Run SFC and DISM Scan Step 1 – Open Command Prompt as Administrator. To do this, type cmd in the window search bar, then hold down the ctrl+shift keys and press enter

Windows does a great job of allocating system resources to the processes and programs that need it most by assigning priorities to them. Most applications you install will run perfectly fine at the default "normal" priority level. Sometimes, however, you may need to run a program, such as a game, at a higher level than the default normal level to improve its performance. But this comes at a cost, and it's a deal worth pondering. What happens when you set an app to high priority? Windows has a total of six priority levels for running different processes and programs - low, below normal, normal, above normal, high and real-time. Windows will rank and queue applications based on their priority. The higher the priority, the application

What is the System32 folder? System32 is one of the main folders used by Windows. During Windows installation, all necessary files and folders that are critical for the proper functioning of Windows are copied to this folder. These include important system files, related executable files used by Windows utilities, dynamic link libraries (DLLs), and even some software files are copied to this folder. However, don't be fooled by the name System32. This is true for both 32-bit and 64-bit computers. In a 64-bit machine, the System32 folder hosts the 64-bit files, while the 32-bit files are located in

Windows PC is advanced and has many components that make it suitable for various purposes. However, users are prone to encounter several problems when using PCs. WHEA logger is a common recent error among Windows users, usually accompanied by many event IDs. It is related to hardware issues and can generate during any activity on the PC. Additionally, you might be interested in our detailed article about the WHEA internal error and some fixes to resolve it. What is a WHEA logger? Windows Hardware Error Architecture (WHEA) is a component in Windows PC that triggers Event Tracing for Windows (ETW) whenever a hardware error occurs

Many of our readers have reported the 0xC004C020 error when trying to connect their computers to their organization's servers. This error prevents activation of its Windows operating system. While errors can be frustrating, we'll guide you through error 0xC004C020 when trying to activate Windows on an organization-linked computer. What causes error 0xC004C020? If you are trying to activate Windows on an organization-linked computer and encounter error 0xC004C020, the possible causes may be as follows: Non-MAK keys – If a non-MAK key is used on an organization-linked computer, the organization’s policies will It is not allowed to be activated. Key access lost after formatting
