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
Winver
reports the version of windows
move
Moves files to a new location or renames them.
del
Deletes a file (e.g., del file.txt deletes file.txt).
rmdir
Deletes a directory (only if it’s empty).
mkdir
Creates a new directory (e.g., mkdir NewFolder).
echo
Displays messages or outputs text to a file (e.g., echo Hello > file.txt).
ping
Tests the network connection to a host by sending ICMP packets (e.g., ping google.com).
tracert
Traces the route packets take to a destination.
pathping
Traces the route packets take to a destination.
nslookup
Resolves a domain name to an IP address or vice versa (e.g., nslookup google.com).
netstat
Displays active network connections and listening ports.
ipconfig
Displays and manages network configuration settings.
find
Searches for a specific string in a file (e.g., find “text” file.txt).