Windows Commands Flashcards
help or /?
It shows available commands and you can get help on a specific command using /? switch.
dir
Lists the files and folders in the current directory.
cd
changes current directory.
xcopy
Copies files and directories, including subdirectories (e.g., xcopy C:\source D:\destination /E).
robocopy
Copies files and directories with advanced options for resilience and performance (e.g., /MIR).
mkdir
make directory.
rmdir /rd
removes a directory
diskpart
Opens the disk partition management utility. It can be used with “select disk 0/1/2/…” or “select volume 0/1/…”. You can enter “detail disk” to see configuration information for the disk.
format
creates a file system on a partition and deletes any data existing on the drive.
chkdsk
X:
X: /f for fix
X: /r for recover
Checks a disk for errors and fixes them if possible.
shutdown
closes all programs and services before powering off the computer. You can add delay by seconds using the /t nn switch.
hibernate (shutdown /h)
save current session to disk before powering off.
Logg off (shutdown /l)
Close all open programs and services started under the user account but leave the computer running.
Restart (shutdown /r)
Close all open programs and services before rebooting without powering down.
sfc
Provides a manual interface for verifying system files and restoring them from cache if they are found to be corrupt or damaged. common switches: /scannow - /scanonce - /scanboot