Terminal commands for Windows

Windows System and Disk Repair Commands


When your Windows system or hard drive starts acting up, there are several built-in commands you can use to diagnose and fix problems. Here's a rundown of some essential tools:


sfc /scannow


- Description: Scans and verifies the integrity of all protected system files, replacing corrupted files with a cached copy.

-  Usage: Open Command Prompt as an administrator and type `sfc /scannow`. Press Enter and let the system file checker do its work.


2. DISM /online /cleanup-image /restorehealth


- Description: Checks and repairs Windows system image files.

- Usage: Open Command Prompt as an administrator and type `DISM /online /cleanup-image /restorehealth`. This command is useful when `sfc /scannow` is unable to fix all the issues.


CHKDSK /F


- Description: Checks the hard drive for errors and fixes them if possible.

-  Usage: Open Command Prompt as an administrator and type `CHKDSK /F`. If the drive is in use, you'll be prompted to schedule the check for the next restart.


CHKDSK /R


- Description: Locates bad sectors and recovers readable information.

- Usage: Open Command Prompt as an administrator and type `CHKDSK /R`. This process can take a long time depending on the size of your hard drive and the number of errors found.


CHKDSK /X


- Description: Forces the volume to dismount before scanning if necessary.

- Usage: Open Command Prompt as an administrator and type `CHKDSK /X`. This is useful if the drive is currently in use and cannot be checked.


These commands are powerful tools for maintaining your Windows system's health and ensuring your hard drives are in good condition. Regular use of these commands can help prevent data loss and improve system performance.


Comments