A list of common windows CMD commands.

Update Ongoing

This list will be updated.

The full list offered by MS is here. I will put some commone ones in this post.
If any command cannot be found: check env variables / sys variables; go toC:\Windows\System32 and open CMD there.

Basics

shutdown - shut down the computer
cmd - start cmd
echo - output text
ver - display OS ver
systeminfo - display all system info
tasklist - display applications and related tasks
date - show/set date
time - show/set time
Type /? behind a command name to see its help (--help for Bash)
Wildcards: * matches any sequence of chars, ? matches a single char.
powercfg - print battery stats
chkdsk /f - check a drive integrity
read - read user input (put this as the last line of a batch file to avoid closing on finishing)

Visual

title - set console title
color - change console color
cls - clear the screen

Run

To start a .exe, just enter its full path and name. Fro batch files,
start - create a new cmd.exe and start the batch file, variables not shared
call - run the batch file in the same cmd window, sharing variables
taskkill - terminate a process or a application
Ctrl+C to terminate a run.
exit - quit cmd
timeout <num of sec> - wait for secs or keystroke (-1 means forever)
schtasks - schedule a task

Network

ping - pings the network
ipconfig - display IP network settings
netstat - get a list of all active TCP connections from computer
net use Z: "..." /persistent:yes - establish a mapping of drive to Z:

d: or D: - change the current drive to “D:/“
cd <path> - go to the specified path (in the same disk only)

Common Pitfalls

Do not use Chinese characters in path.

Try "/" and "\".

cd .. - go back to the parent directory
cd or cd ~ - go back to the home directory (Bash only)
%cs% - (not a command) pwd

File

dir - list directory content (this should be ls in Bash)
tree - display file structure
mkdir - create an empty folder
touch - create a file with the specified format
rmdir - delete a folder
ren or rename - rename a folder or file
del or erase - delete a file (del does not accept wildcard)
move <source_file_path> <destination_file_path> move a file
replace <source_file_path> <destination_dir_path> replace all files in destination_dir with source_file (including all sub-folders)
attrib - get/set file attributes
find or findstr - search
copy xcopy or robocopy - copy files
move - move files (mv in Bash)
unzip - unzip (Bash Only)